You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switch items can be controlled like mosquitto_pub -t "insteon/17.4d.c8/set" -m 'on' but the same syntax does not work for dimmer items e.g. mosquitto_pub -t "insteon/40.b2.b9/set" -m 'on' returns:
2017-12-07 00:33:57 INFO Dimmer: Dimmer message insteon/40.b2.b9/set b'on'
2017-12-07 00:33:57 ERROR Base: MQTT failed to render template level_payload: { "cmd" : "{{json.state.lower()}}",
"level" : {% if json.brightness is defined %}
{{json.brightness}}
{% else %}
255
{% endif %} }
with '{'value': 'on', 'json': None}'
Traceback (most recent call last):
File "/opt/insteon-mqtt/lib/python3.5/site-packages/insteon_mqtt/mqtt/Base.py", line 73, in render
return templ.render(data)
File "/opt/insteon-mqtt/lib/python3.5/site-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/opt/insteon-mqtt/lib/python3.5/site-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/opt/insteon-mqtt/lib/python3.5/site-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "<template>", line 1, in top-level template code
File "/opt/insteon-mqtt/lib/python3.5/site-packages/jinja2/environment.py", line 430, in getattr
return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'None' has no attribute 'state'
Even though the Dimmer template section of the config.yaml file has:
It seems this template is not being applied and the level payload template is and it is looking for mosquitto_pub -t "insteon/40.b2.b9/set" -m '{ "state" : "off" }' which does work.
The text was updated successfully, but these errors were encountered:
Switch items can be controlled like
mosquitto_pub -t "insteon/17.4d.c8/set" -m 'on'
but the same syntax does not work for dimmer items e.g.mosquitto_pub -t "insteon/40.b2.b9/set" -m 'on'
returns:Even though the Dimmer template section of the config.yaml file has:
It seems this template is not being applied and the level payload template is and it is looking for
mosquitto_pub -t "insteon/40.b2.b9/set" -m '{ "state" : "off" }'
which does work.The text was updated successfully, but these errors were encountered: