gickowtf / pixoo-homeassistant

Home Assistant Integration for Divoom Pixoo 64
MIT License
112 stars 12 forks source link

Added proper unavailability support #74

Closed Mrredstone5230 closed 3 months ago

Mrredstone5230 commented 3 months ago

Hello! Here are the changes in this PR. Hope you like it!

-Added proper unavailability logic. -Changed the timout to 9 seconds because otherwise HA would spam the console about it. -Should fix #73

The unavailability stuff isn't perfect. For example, both entities don't become unavailable at the same time, and the current_page number will update to the next available page once internally even if the device is unavailable. But if it works, it works..

gickowtf commented 3 months ago

Hey sorry I'm on the road at the moment but I've just merged anyway

ro8inmorgan commented 3 months ago

Hello! Here are the changes in this PR. Hope you like it!

-Added proper unavailability logic. -Changed the timout to 9 seconds because otherwise HA would spam the console about it. -Should fix #73

The unavailability stuff isn't perfect. For example, both entities don't become unavailable at the same time, and the current_page number will update to the next available page once internally even if the device is unavailable. But if it works, it works..

Was just forking this repo to see if I could fix it, but then realized you already did haha.

Thank you very much, will try it right now