jcgoette / baby_buddy_homeassistant

This custom integration provides sensors for Baby Buddy API endpoints.
MIT License
59 stars 26 forks source link

Add Service Issues with Baby Buddy 2.0.0 Upgrade #118

Closed Borlean closed 12 months ago

Borlean commented 12 months ago

Just upgraded BB to 2.0.0 which caused an issue of duplicating all devices. I removed and reintegrated the connection between Baby_buddy_homeassistant (version 2.7.0) and BabyBuddy and am able to create timers again. I am able to log diaper changes but am unable to log food, receiving the below message.

This error originated from a custom integration.

Logger: custom_components.babybuddy.client
Source: custom_components/babybuddy/client.py:75
Integration: Baby Buddy (documentation, issues)
First occurred: 1:10:31 PM (10 occurrences)
Last logged: 1:29:06 PM

Could not create timers. error: {'start': ['Date/time can not be in the future.']}. Please upgrade to babybuddy v1.11.0. In the meantime, attempting to use 'now()'...
Could not create feedings. error: {'start': ['Date/time can not be in the future.']}. Please upgrade to babybuddy v1.11.0. In the meantime, attempting to use 'now()'...

I tried adding the 'start' offset from the below issue, but without any luck. https://github.com/jcgoette/baby_buddy_homeassistant/issues/82#issuecomment-1416531189

I also checked the timezones, where Baby Buddy is America/New_York and HAOSS is America/New_York as well.

I created a script using both the entity and device options of the Baby Buddy integration without success.

alias: TESTING_Script
sequence:
  - service: babybuddy.add_feeding
    data:
      type: Solid food
      method: Self fed
      amount: 4
      notes: Using Choose Entity
    target:
      entity_id: switch.editedfirstname_editedlastname_timer
  - service: babybuddy.add_feeding
    data:
      type: Solid food
      method: Self fed
      amount: 8
      notes: Using Choose Device
    target:
      device_id: editedID
mode: single
Borlean commented 12 months ago

So, deleting the sequence of the script and recreating did the trick. Not sure modifying the script that was used for the pre-2.0 Baby Buddy didn't work.