Skip to content

Commit

Permalink
Deal with Mr.Steam units
Browse files Browse the repository at this point in the history
  • Loading branch information
gazoodle committed Feb 27, 2025
1 parent 9830b74 commit d74452a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion custom_components/gecko/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def __init__(
)
super().__init__(spaman, config_entry, automation_entity)
self._water_care = water_care
self._water_care.watch(self._on_change)
if self._water_care.is_available:
self._water_care.watch(self._on_change)

@property
def icon(self) -> str:
Expand Down
6 changes: 5 additions & 1 deletion custom_components/gecko/date.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ async def async_setup_entry(
"""Set up date platform."""
spaman: GeckoSpaManager = hass.data[DOMAIN][entry.entry_id]
dates: list = []
if spaman.can_use_facade and spaman.facade is not None:
if (
spaman.can_use_facade
and spaman.facade is not None
and spaman.facade.reminders_manager.is_available
):
dates.extend(
GeckoReminderDate(spaman, entry, reminder.reminder_type)
for reminder in spaman.facade.reminders_manager.reminders
Expand Down
3 changes: 2 additions & 1 deletion custom_components/gecko/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ async def async_setup_entry(
)
if spaman.facade.inmix.is_available and spaman.facade.inmix.syncro.is_available:
selects.append(GeckoInMixSync(spaman, entry))
selects.append(GeckoWatercare(spaman, entry))
if spaman.facade.water_care.is_available:
selects.append(GeckoWatercare(spaman, entry))
async_add_entities(selects)
spaman.platform_loaded(SELECT)

Expand Down
9 changes: 5 additions & 4 deletions custom_components/gecko/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ async def async_setup_entry(
sensors.extend(
GeckoSensor(spaman, entry, sensor) for sensor in spaman.facade.sensors
)
sensors.extend(
GeckoReminderSensor(spaman, entry, reminder.reminder_type)
for reminder in spaman.facade.reminders_manager.reminders
)
if spaman.facade.reminders_manager.is_available:
sensors.extend(
GeckoReminderSensor(spaman, entry, reminder.reminder_type)
for reminder in spaman.facade.reminders_manager.reminders
)
sensors.append(GeckoErrorTextSensor(spaman, entry, spaman.facade.error_sensor))
async_add_entities(sensors)
spaman.platform_loaded(SENSOR)
Expand Down

0 comments on commit d74452a

Please sign in to comment.