Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MegaD-16PWM #27

Closed
scherb-e opened this issue Feb 27, 2021 · 2 comments
Closed

MegaD-16PWM #27

scherb-e opened this issue Feb 27, 2021 · 2 comments

Comments

@scherb-e
Copy link

Добрый день.
Диммер работает, меняет яркость, но если на панели нажать кнопку включения/выключения - следующее:

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/mega/entities.py:272
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 14:07:23 (50 occurrences)
Last logged: 14:14:17

[140172497421552] '>' not supported between instances of 'NoneType' and 'int'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 135, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1451, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1486, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 499, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 664, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 536, in _handle_entity_call
await result
File "/config/custom_components/mega/entities.py", line 357, in async_turn_off
await self.get_state()
File "/config/custom_components/mega/entities.py", line 132, in get_state
self.lg.debug(f'state is %s', self.state)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 676, in state
return STATE_ON if self.is_on else STATE_OFF
File "/config/custom_components/mega/entities.py", line 272, in is_on
return val > 0 if not self.invert else val == 0
TypeError: '>' not supported between instances of 'NoneType' and 'int'

@andvikt
Copy link
Owner

andvikt commented Feb 27, 2021

исправил в v0.5.2, просьба протестировать, отписаться если все ок

@scherb-e
Copy link
Author

Всё работает, спасибо

@andvikt andvikt closed this as completed Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants