Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95925

MQTT Dimmer using state_value_template works in the template tester but not in config

$
0
0

@BurntTech wrote:

Any one have any ideas on getting a dimmer to work states? I tried using single quotes around numbers and not but doesn’t change anything. I have debug logging turned on but nothing appears to be an issue.

Export of the json used in homeassistant/light/dimmer-3f91181/config

{
    "name": "Master Bed Light Switch",
    "command_topic": "homie/dimmer-3f91181/dimmer/dimmer/set",
    "brightness_command_topic": "homie/dimmer-3f91181/dimmer/dimmer/set",
    "brightness_state_topic": "homie/dimmer-3f91181/dimmer/dimmer",
    "state_topic": "homie/dimmer-3f91181/dimmer/dimmer",
    "state_value_template": "{ '0' if value == '0' else '100' }",
    "on_command_type": "brightness",
    "brightness_scale": 100,
    "payload_on": 100,
    "payload_off": 0
}

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>