I have a raspberry pi with a RaZberry connected, and a plugin which sends mqtt messges..
I am trying to configure Home Assistant to correctly communicate with it using MQTT Light, but I cant get it to work. I have tried a lot of different configurations. The Z-Way plugin accepts both numbers and on/off, but always responds with a number. When sending on, it automatically restores the level it had before 0/off was received.
My problems:
- There is no available on_command_type that only sends my payload_on, which would be best.
- Home assistant does not send anything when toggling the on/off-switch to off
- Home Assistant does not understand current on/off state probably because it never receives the on/off payload, only numbers.
My configuration:
platform: mqtt
name: "Bedroom Ceiling Dimmer"
state_topic: "Fredriksberg/Indoor/GroundFloor/Bedroom/CeilingLight/Dimmer"
command_topic: "Fredriksberg/Indoor/GroundFloor/Bedroom/CeilingLight/Dimmer/Set"
payload_off: "0"
payload_on: "on"
brightness_state_topic: "Fredriksberg/Indoor/GroundFloor/Bedroom/CeilingLight/Dimmer"
brightness_command_topic: "Fredriksberg/Indoor/GroundFloor/Bedroom/CeilingLight/Dimmer/Set"
on_command_type: "last"
brightness_scale: 99
optimistic: false