mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Citybikes: Allow None as result for empty slots (#8528)
The citibykes API returns "null" as value for empty_slots on some stations (see #8527). This causes the component to not process the data. This is fixed by accepting None as valid data. The row in the frontend is left empty if "null" was returned by the service. fixes #8527
This commit is contained in:
parent
b83ff739bc
commit
fde4a7d029
@ -82,7 +82,7 @@ NETWORKS_RESPONSE_SCHEMA = vol.Schema({
|
||||
|
||||
STATION_SCHEMA = vol.Schema({
|
||||
vol.Required(ATTR_FREE_BIKES): cv.positive_int,
|
||||
vol.Required(ATTR_EMPTY_SLOTS): cv.positive_int,
|
||||
vol.Required(ATTR_EMPTY_SLOTS): vol.Any(cv.positive_int, None),
|
||||
vol.Required(ATTR_LATITUDE): cv.latitude,
|
||||
vol.Required(ATTR_LONGITUDE): cv.latitude,
|
||||
vol.Required(ATTR_ID): cv.string,
|
||||
|
Loading…
x
Reference in New Issue
Block a user