hi
i have a mqtt light in my ha config.yaml
before i connect it to my hardware , i would to run en control the ha-dashboard , via my nodered .
in my nodered i have :
3 inject buttons , where i can turn on and off the light.
my 3th nodered button , is to set a brightness value .
this sends messages to my broker , but the homeassisant dachboard , does no respond to my injected brightness mqtt’s.
what went wrong ?
[{"id":"c3f41f264219a379","type":"inject","z":"6841c37d8366ee9d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"office/light/status","payload":"ON","payloadType":"str","x":790,"y":1340,"wires":[["5ff3a4c690158a95"]]},{"id":"5ff3a4c690158a95","type":"mqtt out","z":"6841c37d8366ee9d","name":"mqtttest","topic":"","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3d90d83a7b4bcadd","x":900,"y":1260,"wires":[]},{"id":"9a133c3d391b3a83","type":"inject","z":"6841c37d8366ee9d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"office/light/status","payload":"OFF","payloadType":"str","x":800,"y":1380,"wires":[["5ff3a4c690158a95"]]},{"id":"b390d5bdbe8c3af1","type":"mqtt in","z":"6841c37d8366ee9d","name":"","topic":"office/light/brightness/set","qos":"0","datatype":"json","broker":"3d90d83a7b4bcadd","nl":false,"rap":true,"rh":0,"inputs":0,"x":1090,"y":1260,"wires":[["0b816e37f9687db9"]]},{"id":"0b816e37f9687db9","type":"debug","z":"6841c37d8366ee9d","name":"mqtt rx","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1150,"y":1340,"wires":[]},{"id":"be9888a4c381cb91","type":"inject","z":"6841c37d8366ee9d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"office/light/brightness/set","payload":"25","payloadType":"str","x":820,"y":1420,"wires":[["5ff3a4c690158a95"]]},{"id":"3d90d83a7b4bcadd","type":"mqtt-broker","name":"peharesp","broker":"localhost","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]
my mqtt light :
mqtt:
- light:
name: "Office light"
state_topic: "office/light/status"
command_topic: "office/light/switch"
brightness_state_topic: 'office/light/brightness/status'
brightness_command_topic: 'office/light/brightness/set'
qos: 0
payload_on: "ON"
payload_off: "OFF"
optimistic: false
ps : i always ask AI first before creating a topic : which mqtt topic i need to send to change the dimmer value in homeassitant : mqtt: - light: name: "Office light" state_topic: "office/light/status" command_topic: "office/light/switch" brightness_state_topic: 'office/light/brightness/status' brightness_command_topic: 'office/light/brightness/set' qos: 0 payload_on: "ON" payload_off: "OFF" optimistic: false