cgarwood / homeassistant-zwave_mqtt

Limited Pre-Release of the new OZW1.6 Z-Wave component. Currently has limited platform support. Check the README for more details.
72 stars 8 forks source link

Home Assistant switch.toggle isn't implemented? #132

Closed aav7fl closed 4 years ago

aav7fl commented 4 years ago
Home Assistant Stack Trace ```bash Logger: homeassistant.components.automation Source: helpers/entity.py:613 Integration: Automation (documentation, issues) First occurred: 10:29:28 AM (6 occurrences) Last logged: 10:43:35 AM Toggle Noise Machine: Error executing script. Unexpected error for call_service at pos 1: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 153, in _async_step self, f"_async_{cv.determine_script_action(self._action)}_step" File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 623, in _async_call_service_step *self._prep_call_service_step(), blocking=True, context=self._context File "/usr/src/homeassistant/homeassistant/core.py", line 1247, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1282, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service self._platforms.values(), func, call, required_features File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 453, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 596, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 484, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 640, in async_toggle if self.is_on: File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 613, in is_on raise NotImplementedError() NotImplementedError ```

Whenever I try to call the switch.toggle inside HA for my Z-Wave switch, it seems to fail (because it's not implemented?). switch.turn_off and switch.turn_on work perfectly though.

The switch in question is the Zooz Zen15.

Nothing shows up from the MQTT Dump when I run switch.toggle in HA because it doesn't look like HA ever manages to call the service. I did however capture an MQTT Dump of one of my switches while calling switch.turn_on which I've attached.

mqtt_dump.txt

I'm not sure if this is a bug in HA (which has no problem calling switch.toggle on non Z-Wave devices), an implementation issue of the Zen15 OpenZWave config, or an issue with this integration where toggle hasn't been implemented yet.

MartinHjelmare commented 4 years ago

This is a bug in the custom component. We've fixed it in the core integration that we're planning to release soon.

marcelveldt commented 4 years ago

Keep an eye on the release of zwave_mqtt in Home Assistant core. There won't be any fixes anymore in this component.