simple type’o of the custom_components folder. No issue there, the component loads and no errors in the config. here’s my setup…
Wemos D1 mini
Pin D1 (GPIO 5) set for Tasmota group 07 (ws2812)
In the Tasmota Console I set pixel count using the pixels command
I can manually change the color, dimmer and power in the tasmota console. this all works fine. Here’s what doesn’t work…
If my LED strip is OFF and I use homeassistant to turn on the LED strip, the LED’s turn on. However HA does not recognize that the led is on and immediately sets the light to off in the HA UI yet the LED’s are on. If I use the dimmer slider in the HA UI, this will change the brightness. So we know MQTT is working. Not to mention I have several other devices using MQTT.
Any thoughts?
PS: why are you using POWER1 ? If there is only one switch/device in Tasmota it should just be POWER. just curious. thanks I have tried both Power and Power1
I tailed the log filed when turning on the light and here’s the error… YAML follows
Feb 28 13:43:03 HASS hass[5040]: , source=custom_components/light/tasm.py, message=Error doing job: Exception in callback async_subscribe..async_mqtt_topic_subscriber(‘stat/wstest/RESULT’, b’{“POWER”:“ON”}’, 0) at /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/init.py:225, timestamp=1519843383.7100604, level=ERROR>
Feb 28 13:44:03 HASS hass[5040]: 2018-02-28 13:44:03 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 140277257080560: Received {‘type’: ‘call_service’, ‘service’: ‘turn_on’, ‘domain’: ‘homeassistant’, ‘id’: 24, ‘service_data’: {‘entity_id’: ‘light.wstestled’}}
Feb 28 13:44:03 HASS hass[5040]: 2018-02-28 13:44:03 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=entity_id=light.wstestled, service=turn_on, domain=homeassistant, service_call_id=140278335878032-48>
Feb 28 13:44:03 HASS hass[5040]: 2018-02-28 13:44:03 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=entity_id=[‘light.wstestled’], service=turn_on, domain=light, service_call_id=140278335878032-49>
Feb 28 13:44:03 HASS hass[5040]: 2018-02-28 13:44:03 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=topic=cmnd/wstest/POWER1, qos=0, payload=ON, retain=False, service=publish, domain=mqtt, service_call_id=140278335878032-50>
Feb 28 13:44:03 HASS hass[5040]: 2018-02-28 13:44:03 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/wstest/RESULT: {“POWER”:“ON”}
Feb 28 13:44:03 HASS hass[5040]: 2018-02-28 13:44:03 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback async_subscribe..async_mqtt_topic_subscriber(‘stat/wstest/RESULT’, b’{“POWER”:“ON”}’, 0) at /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/init.py:225
Feb 28 13:44:03 HASS hass[5040]: 2018-02-28 13:44:03 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/wstest/RESULT: {“POWER”:“ON”}
Feb 28 13:44:03 HASS hass[5040]: 2018-02-28 13:44:03 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback async_subscribe..async_mqtt_topic_subscriber(‘stat/wstest/RESULT’, b’{“POWER”:“ON”}’, 0) at /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/init.py:225
Feb 28 13:44:03 HASS hass[5040]: 2018-02-28 13:44:03 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/wstest/RESULT: {“POWER”:“ON”}
Feb 28 13:44:03 HASS hass[5040]: 2018-02-28 13:44:03 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback async_subscribe..async_mqtt_topic_subscriber(‘stat/wstest/RESULT’, b’{“POWER”:“ON”}’, 0) at /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/init.py:225
Feb 28 13:44:03 HASS hass[5040]: , source=custom_components/light/tasm.py, message=Error doing job: Exception in callback async_subscribe..async_mqtt_topic_subscriber(‘stat/wstest/RESULT’, b’{“POWER”:“ON”}’, 0) at /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/init.py:225, timestamp=1519843443.0588367, level=ERROR>
Feb 28 13:44:03 HASS hass[5040]: , source=util/color.py, message=Error doing job: Exception in callback async_subscribe..async_mqtt_topic_subscriber(‘stat/wstest/RESULT’, b’{“POWER”:“ON”}’, 0) at /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/init.py:225, timestamp=1519843443.069422, level=ERROR>
Feb 28 13:44:03 HASS hass[5040]: , source=custom_components/light/tasm.py, message=Error doing job: Exception in callback async_subscribe..async_mqtt_topic_subscriber(‘stat/wstest/RESULT’, b’{“POWER”:“ON”}’, 0) at /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/init.py:225, timestamp=1519843443.0840468, level=ERROR>
Feb 28 13:44:03 HASS hass[5040]: 2018-02-28 13:44:03 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 140277257080560: Received {‘type’: ‘call_service’, ‘service’: ‘turn_on’, ‘domain’: ‘homeassistant’, ‘id’: 24, ‘service_data’: {‘entity_id’: ‘light.wstestled’}}
here’s my YAML NOTE: I’m using folders for the light component
platform: tasm
name: “wstestled”
on_command_type: first
state_topic: “stat/wstest/POWER”
command_topic: “cmnd/wstest/POWER”
brightness_state_topic: “stat/wstest/RESULT”
brightness_command_topic: “cmnd/wstest/Dimmer”
brightness_value_template: “{{ value_json.Dimmer }}”
rgb_state_topic: “stat/wstest/RESULT”
rgb_command_topic: “cmnd/wstest/Color2”
rgb_value_template: “{{ value_json.Color }}”
effect_command_topic: “cmnd/wstest/Scheme”
effect_state_topic: “stat/wstest/RESULT”
effect_value_template: “{{ value_json.Scheme }}”
qos: 0
payload_on: “ON”
payload_off: “OFF”
optimistic: false