-
In my setup I have multiple Fibaro Dimmer 2 devices (Device ID: 271-4096-258 (0x010f-0x0102-0x1000)). With Home Assistant I have the problem that when I switched the light on, the value is set to 100% instead of the last used value. I figured out the reason for it. The {
"type": "light",
"object_id": "dimmer_1",
"discovery_payload": {
"command_topic": "zwave/95/38/1/targetValue/set",
"state_topic": "zwave/95/38/1/currentValue",
"state_value_template": "{{ \"OFF\" if value_json.value == 0 else \"ON\" }}",
"brightness_command_topic": "zwave/95/38/1/targetValue/set",
"brightness_scale": 99,
"brightness_state_topic": "zwave/95/38/1/currentValue",
"brightness_value_template": "{{ value_json.value }}",
"on_command_type": "brightness",
"device": {
"identifiers": [
"zwavejs2mqtt_0xf1858849_node95"
],
"manufacturer": "Fibargroup",
"model": "Dimmer 2 (FGD212)",
"name": "Spots bureau werkkamer",
"sw_version": "3.5"
},
"name": "Spots bureau werkkamer_dimmer_1",
"unique_id": "zwavejs2mqtt_0xf1858849_95-38-1-currentValue"
},
"discoveryTopic": "light/Spots_bureau_werkkamer/dimmer_1/config",
"values": [
"38-1-currentValue",
"38-1-targetValue"
],
"persistent": false,
"ignoreDiscovery": false,
"id": "light_dimmer_1"
} The problem is the default If I change the Looking at the source I see that this value is fixed to this In the documentation I read that customDevices.js can be used to make changes to the configuration. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Actually customDevices.js is used only to discover climates/fans devices that could be difficult to discover automatically, how many Fibaro devices do you have? First suggestion is to manually edit the discovery payload and store the discovery devices (see persistent column should show yes) so on next restart those discovery payloads will be used |
Beta Was this translation helpful? Give feedback.
Final update about this issue. After creating a pull request in Home Assistant with my proposed solution, the Home Assistant MQTT code owners figured out the real reason for the issue. Here the summary:
The issue is that a brightness of zero is reported when the light is switched off, this can be solved by updating the
brightness_value_template
to{{ value_json.value if value_json.value > 0 else none }}
, so a value of zero is ignored. This solves the problem in Home Assistant, but then the dimmer is not working with Domoticz anymore. This because Domoticz is not processing the templates correctly. For more details see the discussion: home-assistant/core#91125 (comment)They also came up w…