From cf6c66d7681927eb453ef8a9c3b84f573dbc7616 Mon Sep 17 00:00:00 2001 From: Peter <40281772+petergridge@users.noreply.github.com> Date: Sat, 18 Jan 2025 12:29:23 +1100 Subject: [PATCH] V2025.01.06 Correct entities card yaml output on updating the program configuration --- custom_components/irrigationprogram/manifest.json | 2 +- custom_components/irrigationprogram/program.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/custom_components/irrigationprogram/manifest.json b/custom_components/irrigationprogram/manifest.json index d1fe301..5db86ca 100644 --- a/custom_components/irrigationprogram/manifest.json +++ b/custom_components/irrigationprogram/manifest.json @@ -8,5 +8,5 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/petergridge/irrigation-v5/issues", "requirements": [], - "version": "V2025.01.04" + "version": "V2025.01.06" } diff --git a/custom_components/irrigationprogram/program.py b/custom_components/irrigationprogram/program.py index 0361611..c3ad41f 100644 --- a/custom_components/irrigationprogram/program.py +++ b/custom_components/irrigationprogram/program.py @@ -84,8 +84,6 @@ def __init__( self._localtimezone = ZoneInfo(self._hass.config.time_zone) - if self._program.card_yaml: - self.generate_card() def generate_card (self): """Create card config yaml.""" @@ -405,6 +403,10 @@ def hass_shutdown(event): await super().async_added_to_hass() + # generate the entities card yaml to replicate the custom card + if self._program.card_yaml: + self.generate_card() + @callback def set_up_entity_monitoring(self): """Set up to monitor these entities to change the next run data."""