Open enboig opened 4 months ago
This is working as expected. In openHAB, dimmer channels are a subtype of switches. So you can send ON/OFF to them, and get their current state as OnOffType directly from the dimmer's state. If you happen to have a color bulb, it goes one step further - a Color item is a subtype of a Dimmer, so that's the only channel exposed (if the bulb doesn't support CCT). And you can send a PercentType to set brightness only without changing color, an OnOffType to turn it on/off without touching brightness, or an HSBType to fully set the color and brightness (and turn it on).
Thanks, I started a topic in forum as it seems it's a "user problem" :-) https://community.openhab.org/t/problem-adding-a-switch-to-a-dimmer/155304
I think there is a bug.... moving the slider does nothing https://community.openhab.org/t/problem-adding-a-switch-to-a-dimmer/155304/9
I posted more data in the forum post. Is it enough? Do you need anything else to investigate the problem?
I've got the tab open with your forum post, so I won't forget it. I'll let you know when I get to it if I need more info.
I have found that openhab sends set = 255
and it should be set = {"state":"ON","brightness":254}
and set = {"state":"OFF"}
to make it work
I'm on openHAB 4.3.0-SNAPSHOT, and creating a thing with your configuration, then linking a Switch item to the brightness channel, and sending ON to that item, I see the following message in MQTT: {"state":"ON"}
(it's intentional that brightness is not sent, in order for the bulb to determine if it wants to return to its previous brightness, or turn on at full brightness). If I instead link a dimmer item, and send 100%, MQTT gets {"state":"ON","brightness":254}
. Sending ON to the dimmer channel also gets {"state":"ON"}
.
I created a docker with debian 4.3.0-SNAPSHOT; added mqtt, json transformation and jinja transformation. I created a new mqtt broker. I added only de discovered light.
UID: mqtt:homeassistant_zigbee2mqtt_5F0x0c4314fffe0f8ab6:80d2ea66e5:zigbee2mqtt_5F0x0c4314fffe0f8ab6
label: cuinaLlumTaulell (Light, 4x Sensor, button, 2x device_automation, 3x
select, update)
thingTypeUID: mqtt:homeassistant_zigbee2mqtt_5F0x0c4314fffe0f8ab6
configuration:
topics:
- binary_sensor/0x0c4314fffe0f8ab6/update_available
- button/0x0c4314fffe0f8ab6/identify
- device_automation/0x0c4314fffe0f8ab6/action_off
- device_automation/0x0c4314fffe0f8ab6/action_on
- light/0x0c4314fffe0f8ab6/light
- select/0x0c4314fffe0f8ab6/effect
- select/0x0c4314fffe0f8ab6/identify
- select/0x0c4314fffe0f8ab6/power_on_behavior
- sensor/0x0c4314fffe0f8ab6/linkquality
- sensor/0x0c4314fffe0f8ab6/power_on_behavior
- sensor/0x0c4314fffe0f8ab6/update_state
- update/0x0c4314fffe0f8ab6/update
basetopic: homeassistant
bridgeUID: mqtt:broker:80d2ea66e5
channels:
- id: 0x0c4314fffe0f8ab6_5Faction_5Fon_5Fdevice_5Fautomation#action
channelTypeUID: mqtt:0x0c4314fffe0f8ab6_5Faction_5Fon_5Fdevice_5Fautomation_action
label: MQTT Device Trigger
configuration:
component: device_automation
config: '{"automation_type":"trigger","device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKEA","model":"TRADFRI
LED driver, 30 w
(ICPSHC24-30EU-IL-1/ICPSHC24-10EU-IL-2)","name":"cuinaLlumTaulell","sw_version":"2.3.086","via_device":"zigbee2mqtt_bridge_0x00124b0012c38fda"},"origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"payload":"on","subtype":"on","topic":"zigbee2mqtt/cuinaLlumTaulell/action","type":"action"}'
nodeid: "0x0c4314fffe0f8ab6"
objectid: action_on
- id: 0x0c4314fffe0f8ab6_5Fpower_5Fon_5Fbehavior_5Fzigbee2mqtt#sensor
channelTypeUID: mqtt:0x0c4314fffe0f8ab6_5Fpower_5Fon_5Fbehavior_5Fzigbee2mqtt_sensor
label: Power-on behavior
configuration:
component: sensor
config: '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
value_json.state
}}"}],"device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKEA","model":"TRADFRI
LED driver, 30 w
(ICPSHC24-30EU-IL-1/ICPSHC24-10EU-IL-2)","name":"cuinaLlumTaulell","sw_version":"2.3.086","via_device":"zigbee2mqtt_bridge_0x00124b0012c38fda"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:power-settings","name":"Power-on
behavior","object_id":"cuinallumtaulell_power_on_behavior","origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"state_topic":"zigbee2mqtt/cuinaLlumTaulell","unique_id":"0x0c4314fffe0f8ab6_power_on_behavior_zigbee2mqtt","value_template":"{{
value_json.power_on_behavior }}"}'
nodeid: "0x0c4314fffe0f8ab6"
objectid: power_on_behavior
- id: 0x0c4314fffe0f8ab6_5Fpower_5Fon_5Fbehavior_5Fzigbee2mqtt#select
channelTypeUID: mqtt:0x0c4314fffe0f8ab6_5Fpower_5Fon_5Fbehavior_5Fzigbee2mqtt_select
label: Power-on behavior
configuration:
component: select
config: '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
value_json.state
}}"}],"command_topic":"zigbee2mqtt/cuinaLlumTaulell/set/power_on_behavior","device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKEA","model":"TRADFRI
LED driver, 30 w
(ICPSHC24-30EU-IL-1/ICPSHC24-10EU-IL-2)","name":"cuinaLlumTaulell","sw_version":"2.3.086","via_device":"zigbee2mqtt_bridge_0x00124b0012c38fda"},"enabled_by_default":true,"entity_category":"config","icon":"mdi:power-settings","name":"Power-on
behavior","object_id":"cuinallumtaulell_power_on_behavior","options":["off","on","toggle","previous"],"origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"state_topic":"zigbee2mqtt/cuinaLlumTaulell","unique_id":"0x0c4314fffe0f8ab6_power_on_behavior_zigbee2mqtt","value_template":"{{
value_json.power_on_behavior }}"}'
nodeid: "0x0c4314fffe0f8ab6"
objectid: power_on_behavior
- id: 0x0c4314fffe0f8ab6_5Fupdate_5Fstate_5Fzigbee2mqtt#sensor
channelTypeUID: mqtt:0x0c4314fffe0f8ab6_5Fupdate_5Fstate_5Fzigbee2mqtt_sensor
label: Update state
configuration:
component: sensor
config: "{\"availability\":[{\"topic\":\"zigbee2mqtt/bridge/state\",\"value_tem\
plate\":\"{{ value_json.state
}}\"}],\"device\":{\"identifiers\":[\"zigbee2mqtt_0x0c4314fffe0f8ab6\"],\
\"manufacturer\":\"IKEA\",\"model\":\"TRADFRI LED driver, 30 w
(ICPSHC24-30EU-IL-1/ICPSHC24-10EU-IL-2)\",\"name\":\"cuinaLlumTaulell\",\
\"sw_version\":\"2.3.086\",\"via_device\":\"zigbee2mqtt_bridge_0x00124b\
0012c38fda\"},\"enabled_by_default\":false,\"entity_category\":\"diagno\
stic\",\"icon\":\"mdi:update\",\"name\":\"Update
state\",\"object_id\":\"cuinallumtaulell_update_state\",\"origin\":{\"n\
ame\":\"Zigbee2MQTT\",\"sw\":\"1.39.0\",\"url\":\"https://www.zigbee2mq\
tt.io\"},\"state_topic\":\"zigbee2mqtt/cuinaLlumTaulell\",\"unique_id\":\
\"0x0c4314fffe0f8ab6_update_state_zigbee2mqtt\",\"value_template\":\"{{
value_json['update']['state'] }}\"}"
nodeid: "0x0c4314fffe0f8ab6"
objectid: update_state
- id: brightness
channelTypeUID: mqtt:null_brightness
label: Brightness
configuration:
component: light
config: '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
value_json.state
}}"}],"brightness":true,"brightness_scale":254,"command_topic":"zigbee2mqtt/cuinaLlumTaulell/set","device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKEA","model":"TRADFRI
LED driver, 30 w
(ICPSHC24-30EU-IL-1/ICPSHC24-10EU-IL-2)","name":"cuinaLlumTaulell","sw_version":"2.3.086","via_device":"zigbee2mqtt_bridge_0x00124b0012c38fda"},"effect":true,"effect_list":["blink","breathe","okay","channel_change","finish_effect","stop_effect"],"name":null,"object_id":"cuinallumtaulell","origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"schema":"json","state_topic":"zigbee2mqtt/cuinaLlumTaulell","unique_id":"0x0c4314fffe0f8ab6_light_zigbee2mqtt"}'
nodeid: "0x0c4314fffe0f8ab6"
objectid: light
- id: effect
channelTypeUID: mqtt:null_effect
label: Lighting Effect
configuration:
component: light
config: '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
value_json.state
}}"}],"brightness":true,"brightness_scale":254,"command_topic":"zigbee2mqtt/cuinaLlumTaulell/set","device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKEA","model":"TRADFRI
LED driver, 30 w
(ICPSHC24-30EU-IL-1/ICPSHC24-10EU-IL-2)","name":"cuinaLlumTaulell","sw_version":"2.3.086","via_device":"zigbee2mqtt_bridge_0x00124b0012c38fda"},"effect":true,"effect_list":["blink","breathe","okay","channel_change","finish_effect","stop_effect"],"name":null,"object_id":"cuinallumtaulell","origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"schema":"json","state_topic":"zigbee2mqtt/cuinaLlumTaulell","unique_id":"0x0c4314fffe0f8ab6_light_zigbee2mqtt"}'
nodeid: "0x0c4314fffe0f8ab6"
objectid: light
- id: 0x0c4314fffe0f8ab6_5Fidentify_5Fzigbee2mqtt#button
channelTypeUID: mqtt:0x0c4314fffe0f8ab6_5Fidentify_5Fzigbee2mqtt_button
label: MQTT Button
configuration:
component: button
config: '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
value_json.state
}}"}],"command_topic":"zigbee2mqtt/cuinaLlumTaulell/set/identify","device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKEA","model":"TRADFRI
LED driver, 30 w
(ICPSHC24-30EU-IL-1/ICPSHC24-10EU-IL-2)","name":"cuinaLlumTaulell","sw_version":"2.3.086","via_device":"zigbee2mqtt_bridge_0x00124b0012c38fda"},"device_class":"identify","entity_category":"config","object_id":"cuinallumtaulell_identify","origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"payload_press":"identify","unique_id":"0x0c4314fffe0f8ab6_identify_zigbee2mqtt"}'
nodeid: "0x0c4314fffe0f8ab6"
objectid: identify
- id: 0x0c4314fffe0f8ab6_5Fidentify_5Fzigbee2mqtt#select
channelTypeUID: mqtt:0x0c4314fffe0f8ab6_5Fidentify_5Fzigbee2mqtt_select
label: MQTT Select
configuration:
component: select
config: '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
value_json.state
}}"}],"command_topic":"zigbee2mqtt/cuinaLlumTaulell/set/identify","device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKEA","model":"TRADFRI
LED driver, 30 w
(ICPSHC24-30EU-IL-1/ICPSHC24-10EU-IL-2)","name":"cuinaLlumTaulell","sw_version":"2.3.086","via_device":"zigbee2mqtt_bridge_0x00124b0012c38fda"},"device_class":"identify","enabled_by_default":false,"entity_category":"config","object_id":"cuinallumtaulell_identify","options":["identify"],"origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"unique_id":"0x0c4314fffe0f8ab6_identify_zigbee2mqtt"}'
nodeid: "0x0c4314fffe0f8ab6"
objectid: identify
- id: 0x0c4314fffe0f8ab6_5Faction_5Foff_5Fdevice_5Fautomation#action
channelTypeUID: mqtt:0x0c4314fffe0f8ab6_5Faction_5Foff_5Fdevice_5Fautomation_action
label: MQTT Device Trigger
configuration:
component: device_automation
config: '{"automation_type":"trigger","device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKEA","model":"TRADFRI
LED driver, 30 w
(ICPSHC24-30EU-IL-1/ICPSHC24-10EU-IL-2)","name":"cuinaLlumTaulell","sw_version":"2.3.086","via_device":"zigbee2mqtt_bridge_0x00124b0012c38fda"},"origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"payload":"off","subtype":"off","topic":"zigbee2mqtt/cuinaLlumTaulell/action","type":"action"}'
nodeid: "0x0c4314fffe0f8ab6"
objectid: action_off
- id: sensor
channelTypeUID: mqtt:null_sensor
label: value
configuration:
component: binary_sensor
config: "{\"availability\":[{\"topic\":\"zigbee2mqtt/bridge/state\",\"value_tem\
plate\":\"{{ value_json.state
}}\"}],\"device\":{\"identifiers\":[\"zigbee2mqtt_0x0c4314fffe0f8ab6\"],\
\"manufacturer\":\"IKEA\",\"model\":\"TRADFRI LED driver, 30 w
(ICPSHC24-30EU-IL-1/ICPSHC24-10EU-IL-2)\",\"name\":\"cuinaLlumTaulell\",\
\"sw_version\":\"2.3.086\",\"via_device\":\"zigbee2mqtt_bridge_0x00124b\
0012c38fda\"},\"device_class\":\"update\",\"enabled_by_default\":false,\
\"entity_category\":\"diagnostic\",\"name\":null,\"object_id\":\"cuinal\
lumtaulell_update_available\",\"origin\":{\"name\":\"Zigbee2MQTT\",\"sw\
\":\"1.39.0\",\"url\":\"https://www.zigbee2mqtt.io\"},\"payload_off\":f\
alse,\"payload_on\":true,\"state_topic\":\"zigbee2mqtt/cuinaLlumTaulell\
\",\"unique_id\":\"0x0c4314fffe0f8ab6_update_available_zigbee2mqtt\",\"\
value_template\":\"{{ value_json['update']['state'] == \\\"available\\\"
}}\"}"
nodeid: "0x0c4314fffe0f8ab6"
objectid: update_available
- id: 0x0c4314fffe0f8ab6_5Feffect_5Fzigbee2mqtt#select
channelTypeUID: mqtt:0x0c4314fffe0f8ab6_5Feffect_5Fzigbee2mqtt_select
label: Effect
configuration:
component: select
config: '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
value_json.state
}}"}],"command_topic":"zigbee2mqtt/cuinaLlumTaulell/set/effect","device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKEA","model":"TRADFRI
LED driver, 30 w
(ICPSHC24-30EU-IL-1/ICPSHC24-10EU-IL-2)","name":"cuinaLlumTaulell","sw_version":"2.3.086","via_device":"zigbee2mqtt_bridge_0x00124b0012c38fda"},"enabled_by_default":false,"icon":"mdi:palette","name":"Effect","object_id":"cuinallumtaulell_effect","options":["blink","breathe","okay","channel_change","finish_effect","stop_effect"],"origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"unique_id":"0x0c4314fffe0f8ab6_effect_zigbee2mqtt"}'
nodeid: "0x0c4314fffe0f8ab6"
objectid: effect
- id: 0x0c4314fffe0f8ab6_5Flinkquality_5Fzigbee2mqtt#sensor
channelTypeUID: mqtt:0x0c4314fffe0f8ab6_5Flinkquality_5Fzigbee2mqtt_sensor
label: Linkquality
configuration:
component: sensor
config: '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{
value_json.state
}}"}],"device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKEA","model":"TRADFRI
LED driver, 30 w
(ICPSHC24-30EU-IL-1/ICPSHC24-10EU-IL-2)","name":"cuinaLlumTaulell","sw_version":"2.3.086","via_device":"zigbee2mqtt_bridge_0x00124b0012c38fda"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"Linkquality","object_id":"cuinallumtaulell_linkquality","origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/cuinaLlumTaulell","unique_id":"0x0c4314fffe0f8ab6_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{
value_json.linkquality }}"}'
nodeid: "0x0c4314fffe0f8ab6"
objectid: linkquality
created a dimmer item but when setting it logs show:
[WARN ] [qtt.generic.AbstractMQTTThingHandler] - Channel mqtt:homeassistant_zigbee2mqtt_5F0x0c4314fffe0f8ab6:80d2ea66e5:zigbee2mqtt_5F0x0c4314fffe0f8ab6:brightness not supported!
I don't know how to send "ON" to a dimmer; and adding a switch item to dimmer channel didn't work, changing items at openhab did nothing:
Can you send me the last message in MQTT at zigbee2mqtt/cuinaLlumTaulell
? I don't see how it would affect this particular issue, but #16600 is a significant change to how channels are created, and hopefully it merges soon, so I'm thinking I'll revisit this after that merges.
I have a ikea light configured with zigbee2mqtt (https://www.zigbee2mqtt.io/devices/ICPSHC24-30EU-IL-1.html#ikea-icpshc24-30eu-il-1)
I checked mqtt and homeassistant reports only brightness, while exposes reporots also state.
exposes:
So discovering it don't show a "state" channel and I cannot switch it on:
Expected Behavior
A
state
channel should be discovered to allow switching on the light.Current Behavior
Only brightness can be changed, but light is always off.
Possible Solution
I don't know if it is a zigbee2mqtt bug which should publish
state
someway, or addon should create it.