Skip to content

Commit

Permalink
allow non-matching serial number (because BMS loses it)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElD4n1 committed Apr 20, 2022
1 parent 79f2631 commit 0f2ff79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/bmstools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

# Validation check
if not device_matches_entry(device_info, entry):
_LOGGER.error(
# TODO changed behavior from failing to warning here, because BMS seems to suddenly lose serial number after some time
_LOGGER.warning(
f'Device serial number "{device_info[ATTR_SERIAL_NUMBER]}" does not match serial number "{entry.data[ATTR_SERIAL_NUMBER]}" in config entry!'
)
return False

# TODO how to update config entry or device info shown?
# update_device_info_in_config_entry(device_info, entry)
Expand Down

0 comments on commit 0f2ff79

Please sign in to comment.