diff --git a/.devcontainer/configuration.yaml b/.devcontainer/configuration.yaml index 3d88607..aafd303 100644 --- a/.devcontainer/configuration.yaml +++ b/.devcontainer/configuration.yaml @@ -212,6 +212,8 @@ switch: entity_id: select.seche_serviettes_sdb_rdc_cable_outlet_mode frontend: + extra_module_url: + - /config/www/community/better-thermostat-ui-card/better-thermostat-ui-card.js themes: versatile_thermostat_theme: state-binary_sensor-safety-on-color: "#FF0B0B" diff --git a/custom_components/versatile_thermostat/underlyings.py b/custom_components/versatile_thermostat/underlyings.py index 842c433..9a082a5 100644 --- a/custom_components/versatile_thermostat/underlyings.py +++ b/custom_components/versatile_thermostat/underlyings.py @@ -227,7 +227,7 @@ class UnderlyingSwitch(UnderlyingEntity): def is_device_active(self): """If the toggleable device is currently active.""" real_state = self._hass.states.is_state(self._entity_id, STATE_ON) - return self.is_inversed and not real_state + return (self.is_inversed and not real_state) or (not self.is_inversed and real_state) # @overrides this breaks some unit tests TypeError: object MagicMock can't be used in 'await' expression async def turn_off(self):