meta data for this page
  •  

virtual switch

Create toggle helper in HA: Settings –> Devices & services –> Helpers

Now it is possible to add newly created entity to dashboard.

Usage in AppDaemon:

apps.yaml
heat_pump:
  enabled: true
  weather_automation_enabled_entity: input_boolean.heat_pump_weather_enabled
self._weather_enabled_entity = self.args.get("weather_automation_enabled_entity")
 
if self.entity_exists(self._weather_enabled_entity):
    state = self.get_state(self._weather_enabled_entity)
        if state == "off":
        self.log(f"Entity '{self._weather_enabled_entity}' is off. Ignoring weather change...")
            return