From 954fc6271cd5f557a0542576752029fff279896f Mon Sep 17 00:00:00 2001 From: Jean-Marc Collin Date: Sat, 21 Oct 2023 13:25:49 +0000 Subject: [PATCH] FIX entity_not found error --- custom_components/versatile_thermostat/climate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom_components/versatile_thermostat/climate.py b/custom_components/versatile_thermostat/climate.py index 5c22fae..496d744 100644 --- a/custom_components/versatile_thermostat/climate.py +++ b/custom_components/versatile_thermostat/climate.py @@ -655,7 +655,11 @@ class VersatileThermostat(ClimateEntity, RestoreEntity): # Initialize all UnderlyingEntities for under in self._underlyings: - under.startup() + try: + under.startup() + except UnknownEntity: + # Not found, we will try later + pass temperature_state = self.hass.states.get(self._temp_sensor_entity_id) if temperature_state and temperature_state.state not in (