Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve logging for unsupported sensor, binary sensor and lights #133

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion custom_components/omnilogic_local/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e
pass
case _:
_LOGGER.warning(
"Your system has an unsupported sensor, please raise an issue: https://github.com/cryptk/haomnilogic-local/issues"
"Your system has an unsupported sensor. ID: %s, Name: %s, Type: %s. Please raise an issue: https://github.com/cryptk/haomnilogic-local/issues",
sensor.msp_config.system_id,
sensor.msp_config.name,
sensor.msp_config.type,
)

async_add_entities(entities)
Expand Down
5 changes: 4 additions & 1 deletion custom_components/omnilogic_local/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e
entities.append(OmniLogicLightEntity(coordinator=coordinator, context=system_id))
case _:
_LOGGER.warning(
"Your system has an unsupported light, this light may not function properly, please raise an issue: https://github.com/cryptk/haomnilogic-local/issues"
"Your system has an unsupported light. ID: %s, Name: %s, Type: %s. Please raise an issue: https://github.com/cryptk/haomnilogic-local/issues",
light.msp_config.system_id,
light.msp_config.name,
light.msp_config.type,
)

async_add_entities(entities)
Expand Down
5 changes: 4 additions & 1 deletion custom_components/omnilogic_local/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e
pass
case _:
_LOGGER.warning(
"Your system has an unsupported sensor, please raise an issue: https://github.com/cryptk/haomnilogic-local/issues"
"Your system has an unsupported sensor. ID: %s, Name: %s, Type: %s. Please raise an issue: https://github.com/cryptk/haomnilogic-local/issues",
sensor.msp_config.system_id,
sensor.msp_config.name,
sensor.msp_config.type,
)

# Create energy sensors for filters/pumps suitable for inclusion in the energy dashboard
Expand Down
Loading