Skip to content

Events & Triggers

Mark Parker edited this page May 16, 2023 · 2 revisions

The integration provides a wiser_event event name with types of boosted, started_heating, stopped_heating, target_temperature_increased and target_temperature_decreased, passing also the entity (read climate entity/room) that caused the event. This can be used in 1 or 2 ways.

  1. As an automation trigger on a specific 'room' device in the automations UI

    trigger:
      - platform: device
        device_id: a45b40d19af72fe76bb5f3c195c24737
        domain: wiser
        entity_id: climate.wiser_kitchen
        type: boosted
    trigger:
     - platform: device
       device_id: a45b40d19af72fe76bb5f3c195c24737
       domain: wiser
       entity_id: climate.wiser_kitchen
       type: started_heating
  2. As an event listener in an automation to listen to any events of that type, extract the room that caused it in a template and use that to perform an action.

    alias: Cap Boost Temperature
    description: Listens for boost event and caps to max target temp if above that
    trigger:
      - platform: event
        event_type: wiser_event
        event_data:
          type: boosted
        variables:
          cap_temp: 23.5
          room: "{{trigger.event.data.entity_id}}"
          target_temp: "{{state_attr(trigger.event.data.entity_id, 'temperature')}}"
    condition:
      - condition: template
        value_template: |-
          {% if target_temp|float > cap_temp %}
            True
          {% endif %}
    action:
      - service: climate.set_temperature
        data:
          temperature: "{{cap_temp}}"
        target:
          entity_id: "{{room}}"
    mode: queued
    max: 10
Clone this wiki locally