A new feed item type was introduced, and since we didn't know about the schema, the feed() response was extremely sparse for those items - basically included only the cursor and type. We then try to sort by createdAt in order to select the newest edge in the feed, but because we weren't selecting the createdAt field in the GraphQL query, the field is None, which cannot be converted to a datetime and cannot take part in max(key=lambda).
This change adds the new feed item type and related fields, and also attempts to fix the missing createdAt issue, so that new feed item types will not break the coordinator like this in the future.
A new feed item type was introduced, and since we didn't know about the schema, the
feed()
response was extremely sparse for those items - basically included only the cursor and type. We then try to sort bycreatedAt
in order to select the newest edge in the feed, but because we weren't selecting thecreatedAt
field in the GraphQL query, the field isNone
, which cannot be converted to adatetime
and cannot take part inmax(key=lambda)
.This change adds the new feed item type and related fields, and also attempts to fix the missing
createdAt
issue, so that new feed item types will not break the coordinator like this in the future.This resolves https://github.com/jhansche/ha-birdbuddy/issues/73