-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add service to refresh state periodically #271
Conversation
@@ -191,10 +223,33 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry): | |||
|
|||
async def update_listener(hass: HomeAssistant, entry: ConfigEntry): | |||
"""Update when config_entry options update.""" | |||
|
|||
async def handle_refresh_states(*_): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the duplicate code I don't like that much.
791c116
to
02a2628
Compare
I am not sure if we should allow them to set this to 5 seconds, since it is a very 'expensive' call and it looks like you get 'TooManyRequests' exception when polling on a high interval. Currently we don't catch TooManyRequests exception that well in DataUpdateCoordinator. |
Signed-off-by: Mick Vleeshouwer <[email protected]>
Signed-off-by: Mick Vleeshouwer <[email protected]>
Signed-off-by: Mick Vleeshouwer <[email protected]>
Signed-off-by: Mick Vleeshouwer <[email protected]>
Signed-off-by: Mick Vleeshouwer <[email protected]>
Signed-off-by: Mick Vleeshouwer <[email protected]>
Signed-off-by: Mick Vleeshouwer <[email protected]>
Signed-off-by: Mick Vleeshouwer <[email protected]>
Signed-off-by: Mick Vleeshouwer <[email protected]>
Signed-off-by: Mick Vleeshouwer <[email protected]>
Signed-off-by: Mick Vleeshouwer <[email protected]>
Signed-off-by: Mick Vleeshouwer <[email protected]>
d419ce3
to
9fba7c0
Compare
PR has been tested and is fully functional, however I am still in doubt if we should disable this task by default. Maybe we should add a checkbox to enable this task. |
That looks like something that Somfy wouldn't like, especially if set with low values. I think it would be better not enabling that, especially by default, if it can get users/software in trouble. |
Agreed, I would leave that unchecked by default and let users be responsible for making an automation to use it. |
Indeed, I am on the same page. Currently the widely used |
@iMicknl as you know I would love for this to be pulled in to the master - my gate closes automatically two minutes after opening, which is not caught by Tahome unless I use an automation that calls the refresh service two minutes after my gate's state has changed from closed. I understand that caution is needed though. |
I think this one can be closed. This isn't something that will be added to core IMO. |
The Somfy Dexxo smart io (io:DiscreteGarageOpenerWithPartialPositionIOComponent) supports a third position state: partial. This state is meant to be used to ventilate the garage. This commit adds a select entity for the position state. The implementation is very similar to the already existing position state for gate's with a pedestrian position. Note: For the updates to work properly, we'd still need iMicknl/ha-tahoma#167 / iMicknl/ha-tahoma#271 to be implemented. See Somfy-Developer/Somfy-TaHoma-Developer-Mode#26 for discussion with Somfy.
The Somfy Dexxo smart io (io:DiscreteGarageOpenerWithPartialPositionIOComponent) supports a third position state: partial. This state is meant to be used to ventilate the garage. This commit adds a select entity for the position state. The implementation is very similar to the already existing position state for gate's with a pedestrian position. Note: For the updates to work properly, we'd still need iMicknl/ha-tahoma#167 / iMicknl/ha-tahoma#271 to be implemented. See Somfy-Developer/Somfy-TaHoma-Developer-Mode#26 for discussion with Somfy.
The Somfy Dexxo smart io (io:DiscreteGarageOpenerWithPartialPositionIOComponent) supports a third position state: partial. This state is meant to be used to ventilate the garage. This commit adds a select entity for the position state. The implementation is very similar to the already existing position state for gate's with a pedestrian position. Note: For the updates to work properly, we'd still need iMicknl/ha-tahoma#167 / iMicknl/ha-tahoma#271 to be implemented. See Somfy-Developer/Somfy-TaHoma-Developer-Mode#26 for discussion with Somfy.
The Somfy Dexxo smart io (io:DiscreteGarageOpenerWithPartialPositionIOComponent) supports a third position state: partial. This state is meant to be used to ventilate the garage. This commit adds a select entity for the position state. The implementation is very similar to the already existing position state for gate's with a pedestrian position. Note: For the updates to work properly, we'd still need iMicknl/ha-tahoma#167 / iMicknl/ha-tahoma#271 to be implemented. See Somfy-Developer/Somfy-TaHoma-Developer-Mode#26 for discussion with Somfy.
The Somfy Dexxo smart io (io:DiscreteGarageOpenerWithPartialPositionIOComponent) supports a third position state: partial. This state is meant to be used to ventilate the garage. This commit adds a select entity for the position state. The implementation is very similar to the already existing position state for gate's with a pedestrian position. Note: For the updates to work properly, we'd still need iMicknl/ha-tahoma#167 / iMicknl/ha-tahoma#271 to be implemented. See Somfy-Developer/Somfy-TaHoma-Developer-Mode#26 for discussion with Somfy.
The Somfy Dexxo smart io (io:DiscreteGarageOpenerWithPartialPositionIOComponent) supports a third position state: partial. This state is meant to be used to ventilate the garage. This commit adds a select entity for the position state. The implementation is very similar to the already existing position state for gate's with a pedestrian position. Note: For the updates to work properly, we'd still need iMicknl/ha-tahoma#167 / iMicknl/ha-tahoma#271 to be implemented. See Somfy-Developer/Somfy-TaHoma-Developer-Mode#26 for discussion with Somfy.
The Somfy Dexxo smart io (io:DiscreteGarageOpenerWithPartialPositionIOComponent) supports a third position state: partial. This state is meant to be used to ventilate the garage. This commit adds a select entity for the position state. The implementation is very similar to the already existing position state for gate's with a pedestrian position. Note: For the updates to work properly, we'd still need iMicknl/ha-tahoma#167 / iMicknl/ha-tahoma#271 to be implemented. See Somfy-Developer/Somfy-TaHoma-Developer-Mode#26 for discussion with Somfy.
The Somfy Dexxo smart io (io:DiscreteGarageOpenerWithPartialPositionIOComponent) supports a third position state: partial. This state is meant to be used to ventilate the garage. This commit adds a select entity for the position state. The implementation is very similar to the already existing position state for gate's with a pedestrian position. Note: For the updates to work properly, we'd still need iMicknl/ha-tahoma#167 / iMicknl/ha-tahoma#271 to be implemented. See Somfy-Developer/Somfy-TaHoma-Developer-Mode#26 for discussion with Somfy.
The Somfy Dexxo smart io (io:DiscreteGarageOpenerWithPartialPositionIOComponent) supports a third position state: partial. This state is meant to be used to ventilate the garage. This commit adds a select entity for the position state. The implementation is very similar to the already existing position state for gate's with a pedestrian position. Note: For the updates to work properly, we'd still need iMicknl/ha-tahoma#167 / iMicknl/ha-tahoma#271 to be implemented. See Somfy-Developer/Somfy-TaHoma-Developer-Mode#26 for discussion with Somfy.
Adds support for calling
/setup/devices/states/refresh
periodically, using the existing data update coordinator.Fixes #167.