- platform: mqtt
  name: "LED"
  command_topic: "cmnd/20/Output/14"
  state_topic: "stat/20/Output/14"
  payload_on: "0"
  payload_off: "1"
- platform: mqtt
  name: "relay 1"
  command_topic: "cmnd/20/Output/1"
  state_topic: "stat/20/Output/1"
  payload_on: "0"
  payload_off: "1"
- platform: mqtt
  name: "relay 2"
  command_topic: "cmnd/20/Output/2"
  state_topic: "stat/20/Output/2"
  payload_on: "0"
  payload_off: "1"
- platform: mqtt
  name: "relay 3"
  command_topic: "cmnd/20/Output/3"
  state_topic: "stat/20/Output/3"
  payload_on: "0"
  payload_off: "1"
- platform: mqtt
  name: "relay 4"
  command_topic: "cmnd/20/Output/4"
  state_topic: "stat/20/Output/4"
  payload_on: "0"
  payload_off: "1"
- platform: mqtt
  name: "relay 5"
  command_topic: "cmnd/20/Output/5"
  state_topic: "stat/20/Output/5"
  payload_on: "0"
  payload_off: "1"
- platform: mqtt
  name: "relay 6"
  command_topic: "cmnd/20/Output/6"
  state_topic: "stat/20/Output/6"
  payload_on: "0"
  payload_off: "1"
- platform: mqtt
  name: "relay 7"
  command_topic: "cmnd/20/Output/7"
  state_topic: "stat/20/Output/7"
  payload_on: "0"
  payload_off: "1"
- platform: mqtt
  name: "relay 8"
  command_topic: "cmnd/20/Output/8"
  state_topic: "stat/20/Output/8"
  payload_on: "0"
  payload_off: "1"
- platform: mqtt
  name: "relay 9"
  command_topic: "cmnd/20/Output/9"
  state_topic: "stat/20/Output/9"
  payload_on: "0"
  payload_off: "1"
- platform: mqtt
  name: "relay 10"
  command_topic: "cmnd/20/Output/10"
  state_topic: "stat/20/Output/10"
  payload_on: "0"
  payload_off: "1"
- platform: mqtt
  name: "relay 11"
  command_topic: "cmnd/20/Output/11"
  state_topic: "stat/20/Output/11"
  payload_on: "0"
  payload_off: "1"
- platform: mqtt
  name: "relay 12"
  command_topic: "cmnd/20/Output/12"
  state_topic: "stat/20/Output/12"
  payload_on: "0"
  payload_off: "1"
- platform: mqtt
  name: "relay_13"
  command_topic: "cmnd/20/Output/13"
  state_topic: "stat/20/Output/13"
  payload_on: "0"
  payload_off: "1"
- platform: mqtt
  name: "relay 14"
  command_topic: "cmnd/20/Output/14"
  state_topic: "stat/20/Output/14"
  payload_on: "0"
  payload_off: "1"



#----------------------------------------
#
#     tasmota
#
#----------------------------------------
  
- platform: mqtt
  name: "Comble"
  state_topic: "stat/comble/RESULT"
  value_template: "{{ value_json.POWER }}"
  command_topic: "cmnd/comble/Power1"
  availability_topic: "tele/comble/LWT"
  qos: 0
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: false
- platform: mqtt
  name: "Cave"
  state_topic: "stat/cave/RESULT"
  value_template: "{{ value_json.POWER1 }}"
  command_topic: "cmnd/cave/Power1"
  availability_topic: "tele/cave/LWT"
  qos: 0
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: false
  

- platform: mqtt
  name: "Cave2"
  state_topic: "stat/cave/RESULT"
  value_template: "{{ value_json.POWER4 }}"
  command_topic: "cmnd/cave/Power4"
  availability_topic: "tele/cave/LWT"
  qos: 0
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: false
- platform: mqtt
  name: "VMC1"
  state_topic: "stat/sonoffVMC/RESULT"
  value_template: "{{ value_json.POWER1 }}"
  command_topic: "cmnd/sonoffVMC/Power1"
  availability_topic: "tele/sonoffVMC/LWT"
  qos: 0
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: false
  
- platform: mqtt
  name: "VMC2"
  state_topic: "stat/sonoffVMC/RESULT"
  value_template: "{{ value_json.POWER2 }}"
  command_topic: "cmnd/sonoffVMC/Power2"
  availability_topic: "tele/sonoffVMC/LWT"
  qos: 0
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: false
- platform: mqtt
  name: "Eclairage bois"
  state_topic: "stat/garage/RESULT"
  value_template: "{{ value_json.POWER }}"
  command_topic: "cmnd/garage/Power"
  availability_topic: "tele/garage/LWT"
  qos: 0
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: false
  
- platform: mqtt
  name: "Couloir"
  state_topic: "stat/couloir/RESULT"
  value_template: "{{ value_json.POWER }}"
  command_topic: "cmnd/couloir/Power"
  availability_topic: "tele/couloir/LWT"
  qos: 0
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: false 
  
- platform: mqtt
  name: "Escalier"
  state_topic: "stat/escalier/RESULT"  
  value_template: "{{ value_json.POWER }}"
  command_topic: "cmnd/escalier/POWER"
  payload_on: "ON"
  payload_off: "OFF"
  availability_topic: "tele/escalier/LWT"
  payload_available: "Online"
  payload_not_available: "Offline"
  qos: 1
  retain: false

- platform: mqtt
  name: "Dressing"
  state_topic: "stat/dressing/RESULT"
  value_template: "{{ value_json.POWER }}"
  command_topic: "cmnd/dressing/Power"
  availability_topic: "tele/dressing/LWT"
  qos: 0
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: false 
  

  
- platform: mqtt
  name: "bureau1"
  state_topic: "stat/bureau1/RESULT"
  value_template: "{{ value_json.POWER }}"
  command_topic: "cmnd/bureau1/Power1"
  availability_topic: "tele/bureau1/LWT"
  qos: 0
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: false

- platform: mqtt
  name: "bureau2"
  state_topic: "stat/bureau2/RESULT"
  value_template: "{{ value_json.POWER }}"
  command_topic: "cmnd/bureau2/Power1"
  availability_topic: "tele/bureau2/LWT"
  qos: 0
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: false

- platform: mqtt
  name: "lampe_bureau"
  state_topic: "stat/desklamp/POWER"
  command_topic: "cmnd/desklamp/POWER"
  availability_topic: "tele/desklamp/LWT"
  brightness_state_topic: "stat/desklamp/RESULT"
  brightness_command_topic: "cmnd/desklamp/Dimmer"
  brightness_scale: 100
  brightness_value_template: "{{ value_json.Dimmer }}"
  qos: 1
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: false

#----------------------------------------
#
#     dimmer TUYA
#
#----------------------------------------
- platform: mqtt
  name: "plafond_cuisine2"
  state_topic: "stat/plafond_cuisine/POWER"
  command_topic: "cmnd/plafond_cuisine/POWER"
  availability_topic: "tele/plafond_cuisine/LWT"
  brightness_state_topic: "stat/plafond_cuisine/RESULT"
  brightness_command_topic: "cmnd/plafond_cuisine/Dimmer"
  brightness_scale: 100
  brightness_value_template: "{{ value_json.Dimmer }}"
  qos: 1
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: false
- platform: mqtt
  name: "plafond_salon2"
  state_topic: "stat/plafond_salon/POWER"
  command_topic: "cmnd/plafond_salon/POWER"
  availability_topic: "tele/plafond_salon/LWT"
  brightness_state_topic: "stat/plafond_salon/RESULT"
  brightness_command_topic: "cmnd/plafond_salon/Dimmer"
  brightness_scale: 100
  brightness_value_template: "{{ value_json.Dimmer }}"
  qos: 1
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  retain: false 

#----------------------------------------
#
#     H801 tasmota RGB
#
#----------------------------------------
- platform: mqtt
  name: "RGB"
  state_topic: "stat/sonoffrgb/POWER"
  command_topic: "cmnd/sonoffrgb/POWER"
  #brightness_state_topic: "008565AA/rgb/brightness/status"
  #brightness_command_topic: "008565AA/rgb/brightness/set"
  rgb_state_topic: "state/sonoffrgb/color"
  rgb_command_topic: "cmnd/sonoffrgb/color"
  state_value_template: "{{ value_json.state }}"
  brightness_value_template: "{{ value_json.brightness }}"
  rgb_value_template: "{{ value_json.rgb | join(',') }}"
  qos: 0
  payload_on: "ON"
  payload_off: "OFF"
  optimistic: false
  #brightness: true
  #rgb: true

#----------------------------------------
#
#     RFXCOM with Node-red
#
#----------------------------------------




- platform: mqtt
  name: "applique_salon"
  schema: json
  state_topic: "home/light/a_salon"
  command_topic: "home/light/a_salon/set"
  brightness: true
  rgb: false
  brightness_scale: 100
  unique_id: "AC/0x011E611E/1"
 # state_topic: "home/app_salon/light/status"
 # command_topic: "home/app_salon/light/switch"
 # brightness_state_topic: 'home/app_salon/light/brightness'
 # brightness_command_topic: 'home/app_salon/light/brightness/set'
 # qos: 0
 # payload_on: "On"
 # payload_off: "Off"
 # optimistic: false


- platform: mqtt
  name: "applique_cuisine"
  schema: json
  state_topic: "home/light/a_cuisine"
  command_topic: "home/light/a_cuisine/set"
  brightness: true
  rgb: false
  brightness_scale: 100
  unique_id: "AC/0x011E611E/2"
 # state_topic: "home/app_salon/light/status"
 # command_topic: "home/app_salon/light/switch"
 # brightness_state_topic: 'home/app_salon/light/brightness'
 # brightness_command_topic: 'home/app_salon/light/brightness/set'
 # qos: 0
 # payload_on: "On"
 # payload_off: "Off"
 # optimistic: false

- platform: mqtt
  name: "plafond_salon"
  schema: json
  state_topic: "home/light/p_salon"
  command_topic: "home/light/p_salon/set"
  brightness: true
  rgb: false
  brightness_scale: 100
  unique_id: "AC/0x011E611E/3"
 # state_topic: "home/app_salon/light/status"
 # command_topic: "home/app_salon/light/switch"
 # brightness_state_topic: 'home/app_salon/light/brightness'
 # brightness_command_topic: 'home/app_salon/light/brightness/set'
 # qos: 0
 # payload_on: "On"
 # payload_off: "Off"
 # optimistic: false

- platform: mqtt
  name: "plafond_cuisine"
  schema: json
  state_topic: "home/light/p_cuisine"
  command_topic: "home/light/p_cuisine/set"
  brightness: true
  rgb: false
  brightness_scale: 100
  unique_id: "AC/0x011E611E/4"
 # state_topic: "home/app_salon/light/status"
 # command_topic: "home/app_salon/light/switch"
 # brightness_state_topic: 'home/app_salon/light/brightness'
 # brightness_command_topic: 'home/app_salon/light/brightness/set'
 # qos: 0
 # payload_on: "On"
 # payload_off: "Off"
 # optimistic: false


- platform: mqtt
  name: "chambre"
  schema: json
  state_topic: "home/light/chambre"
  command_topic: "home/light/chambre/set"
  brightness: true
  rgb: false
  brightness_scale: 100
  unique_id: "AC/0x011E611E/5"
 # state_topic: "home/app_salon/light/status"
 # command_topic: "home/app_salon/light/switch"
 # brightness_state_topic: 'home/app_salon/light/brightness'
 # brightness_command_topic: 'home/app_salon/light/brightness/set'
 # qos: 0
 # payload_on: "On"
 # payload_off: "Off"
 # optimistic: false
