jcgoette / baby_buddy_homeassistant

This custom integration provides sensors for Baby Buddy API endpoints.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

timer switch entity not working with 2.0.0-beta1

Cadair opened this issue · comments

Hello,

I haven't had a chance to look into this yet but it seems that the 2.0.0 beta breaks the timer switch (it's just always off) everything else appears to work fine, and there's no errors in the logs.

Ok, so after some sleuthing around, it seems that the API response for timers back from babybuddy no longer includes an 'active' field in the timer JSON:

2023-05-04 16:40:19.404 DEBUG (MainThread) [custom_components.babybuddy.switch] self.coordinator.data[1][self.child[ATTR_ID]][ATTR_TIMERS]={'id': 3985, 'child': 1, 'name': None, 'start': '2023-05-04T16:36:18.151572+01:00', 'duration': '00:04:01.211576', 'user': 3}
2023-05-04 16:40:19.404 DEBUG (MainThread) [custom_components.babybuddy.switch] is_on=False

Further sleuthing reveals this is probably deliberate: babybuddy/babybuddy@7b7f17f