Skip to content

Commit

Permalink
fix: re-enable sensor creation
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerSelwyn committed Oct 31, 2023
1 parent 30f804a commit 30fb3fc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions custom_components/o365/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,16 @@ def _load_platforms(hass, account_name, config, account_config):
or len(account_config[CONF_QUERY_SENSORS]) > 0
or len(account_config[CONF_STATUS_SENSORS]) > 0
or len(account_config[CONF_CHAT_SENSORS]) > 0
or (
len(account_config[CONF_TODO_SENSORS]) > 0
and account_config[CONF_TODO_SENSORS].get(CONF_ENABLED, False)
)
):
hass.async_create_task(
# discovery.async_load_platform(
# hass, "sensor", DOMAIN, {CONF_ACCOUNT_NAME: account_name}, config
# )
discovery.async_load_platform(
hass, "sensor", DOMAIN, {CONF_ACCOUNT_NAME: account_name}, config
)
)
if len(account_config[CONF_TODO_SENSORS]) > 0 and account_config[
CONF_TODO_SENSORS
].get(CONF_ENABLED, False):
hass.async_create_task(
discovery.async_load_platform(
hass, "todo", DOMAIN, {CONF_ACCOUNT_NAME: account_name}, config
)
Expand Down

0 comments on commit 30fb3fc

Please sign in to comment.