Conversation
Those are special switches that can only be pushed. Their state is always OFF, they react to the turn_on action, perform it, but stay OFF
|
Please don't delete the PR template. Without it, reviewers can't reasonable tell whether they should do anything with this. |
|
Sorry, 1st PR... :) |
| return 'garage' | ||
| return None | ||
|
|
||
| def turn_on(self, **kwargs): |
There was a problem hiding this comment.
I don't think you need this. switch.toggle works just fine, right?
There was a problem hiding this comment.
I'll try to remove it to check that, but I think I tryed.
I think I couldn't have it displayed on GUI then, or that the GUI does not offer the "toggle" button. I might have miss something ?
There was a problem hiding this comment.
As expected:
File "/mnt/d/git/home-assistant/homeassistant/helpers/entity.py", line 388, in turn_on
raise NotImplementedError()
The switch exposed on the GUI uses on/off function. It would probably possible to call toggle directly, but in order to have a more user friendly interface, I think it is better to keep the "turn_on" function.
Added the ability to switch Tahoma Garage door relay.
Description:
Those are special switches that can only be pushed.
Their state is always OFF, they react to the turn_on action, perform it, but stay OFF
Related issue (if applicable): None
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5118
Example entry for
configuration.yaml(if applicable):None (included within tahoma plateform)
Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools: