What's the command you're sending from MQTT Explorer (that works)?
And what does your configuration.yaml entry for the switch look like?
indigo/devices/1752710570/command/on
indigo/devices/1752710570/command/off
- platform: mqtt
name: "Office desk switch"
state_topic: "indigo/devices/1752710570/update"
command_topic: "indigo/devices/1752710570/command"
payload_on: "on"
payload_off: "off"
state_on: "True"
state_off: "False"
optimistic: false
value_template: '{{value_json.states.onOffState}}'
qos: 0
retain: true
command_topic: "indigo/devices/1752710570/command"
command_topic: "indigo/devices/1752710570/command/set"
haavarda wrote:If I subscribe to
- Code: Select all
indigo/devices/1752710570/command/on
indigo/devices/1752710570/command/off
indigo/devices/#
indigo/devices/#
{
"name": "Light - Desk - Office",
"deviceId": "1752710570",
"model": "Ambiance Lights",
"address": "192.168.2.41 (ID 15)",
"states": {
"alertMode": "none",
"alertMode.ui": "none",
"brightnessLevel": "100",
"brightnessLevel.ui": "100",
"colorMode": "ct",
"colorMode.ui": "ct",
"colorTemp": "2959",
"colorTemp.ui": "2959",
"effect": "none",
"effect.ui": "none",
"onOffState": "True",
"online": "True",
"online.ui": "True",
"whiteLevel": "100.0",
"whiteLevel.ui": "100",
"whiteTemperature": "2959.0",
"whiteTemperature.ui": "2959"
}
}
- platform: mqtt
name: "Office desk light"
state_topic: "indigo/devices/1752710570/update"
command_topic: "indigo/devices/1752710570/command/set"
brightness_state_topic: "indigo/devices/1752710570/update"
brightness_command_topic: "indigo/devices/1752710570/command/brightness"
state_value_template: "{{value_json.states.onOffState}}"
brightness_value_template: "{{value_json.states.brightnessLevel}}"
qos: 0
payload_on: "on"
payload_off: "off"
optimistic: false
brightness_scale: 100
#on_command_type: brightness
- platform: mqtt
name: "Office desk light"
#state_topic: "indigo/devices/1752710570/update"
command_topic: "indigo/devices/1752710570/command/set"
brightness_state_topic: "indigo/devices/1752710570/update"
brightness_command_topic: "indigo/devices/1752710570/command/brightness"
#state_value_template: "{{value_json.states.onOffState}}"
brightness_value_template: "{{value_json.states.brightnessLevel}}"
#value_template: "{{value_json.states.brightnessLevel}}" #Temp
qos: 0
payload_on: "on"
payload_off: "off"
optimistic: false
brightness_scale: 100
on_command_type: brightness
#state_topic: "indigo/devices/1752710570/update"
- platform: mqtt
name: "Office desk light"
state_topic: "indigo/devices/1752710570/update"
command_topic: "indigo/devices/1752710570/command/set"
brightness_state_topic: "indigo/devices/1752710570/update"
brightness_command_topic: "indigo/devices/1752710570/command/brightness"
state_value_template: '{{ "on" if value_json.states.onOffState == "True" else "off" }}'
brightness_value_template: "{{value_json.states.brightnessLevel}}"
#on_command_type: brightness
qos: 0
payload_on: "on"
payload_off: "off"
optimistic: false
brightness_scale: 100
on_command_type: brightness
Users browsing this forum: No registered users and 2 guests