I have an mqtt switch setup in floorplan but it seems to execute twice (turns off then right back on) Everything else on the floorplan works fine including the other switches and if I execute it manually or in the HA ui the switch works fine so it’s something with the floorplan connection. Should mqtt devices be handled differently than switches? Could it be because the floorplan is a fake mqtt binary_sensor?
configuration.yaml
binary_sensor:
- platform: mqtt
state_topic: dummy/floorplan/sensor
name: Floorplan
switch:
- platform: mqtt
name: "Cabinet Lights"
command_topic: "cmnd/sonoff01/POWER"
floorplan.yaml
name: Floorplan
image: /local/custom_ui/floorplan/floorplan.svg
stylesheet: /local/custom_ui/floorplan/floorplan.css
hide_app_toolbar:
warnings: # enable warnings (to find out why things might ot be working correctly)
date_format: MMM-DD-YYYY # Date format to use in hover-over text
groups:
- name: Lights
entities:
- light.dining_light_level
- light.bedroom_light_level
- light.fireplace_left
- light.fireplace_right
- light.living_room
- light.island_light_level
- light.pantry
states:
- state: 'on'
class: 'light-on'
- state: 'off'
class: 'light-off'
action:
domain: light
service: toggle
- name: Switches
entities:
- switch.hallway_light_switch
- switch.entry_light_switch
- switch.cabinet_lights
- switch.bathroom_light_switch
states:
- state: 'on'
class: 'light-on'
- state: 'off'
class: 'light-off'
action:
domain: switch
service: toggle
- name: Scenes
entities:
- script.lock_up
- script.bedtime
action:
domain: homeassistant
service: turn_on