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

cover-time-based component follow when switches are actived external... #7

Open
marcelrealsolutionsnu opened this issue Feb 12, 2021 · 2 comments

Comments

@marcelrealsolutionsnu
Copy link

Hello,

The cover-time-based component works great to control my rollers/shutters (they are now connected to modbus I/O, one output for open, one output for close).
I've also tested this with Sonoff Wifi Wall switch (https://sonoff.tech/product/wifi-smart-wall-swithes/tx-series) and this works also great as long as the command comes from home-assistant (HA).

My question is: the great advantage of the Sonoff Wifi Wall switch is that I can replace my current switches, and still can control them by touching the switch, or via home-assistant.
But if I control via the switch by pressing the button, then the shutters can be opened/closed, but HA does not 'know' this, so my idea is: if I notice in HA that the switch for 'opening' is active/pressed and the cover in HA is not in state 'opening' then trigger the cover to open... (so in that case the cover in HA follows the state when I press the buttons on the wall switch)....
Seems to me that this can be achieved, but hope you have good ideas how to do this...

BR, and I will of-course buy you a coffee/beer!
Marcel (The Netherlands)

@davidramosweb
Copy link
Owner

Hello,
To do that, you need to put your Sonoff Wifi wall switch in detached mode. You can replace the firmware with tasmota and configure them in detached mode.
https://tasmota.github.io/docs/Buttons-and-Switches/#detach-switches-based-on

Once this is done, you will need to assign the relays to the cover component (open_switch_entity_id and close_switch_entity_id) and create an automation with button events to open and close the cover.

For example
When the right button is pressed:

entity_id: cover.your_cover_alias
service: cover.open_cover

When the left button is pressed

entity_id: cover.your_cover_alias
service: cover.close_cover

When the two buttons are pressed at the same time:

entity_id: cover.your_cover_alias
service: cover.stop_cover

So it will be "HA" who controls the relays and will have knowledge of when the button has been pressed.

Sonoff Wifi wall switch Tasmota templates
https://templates.blakadder.com/sonoff_TX-T0EU2C.html

:)

@marcelrealsolutionsnu
Copy link
Author

marcelrealsolutionsnu commented Feb 12, 2021 via email

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