Hello! Some info about me is up on my website: https://wreckedcarzz.com/

  • 0 Posts
  • 1.56K Comments
Joined 3 years ago
cake
Cake day: August 23rd, 2023

help-circle



  • Physical button: 1 action, no logic

    Software button: infinite actions, complete logic over everything in HA

    It’s like ‘why should I use HA, the light switch is right there’ yes technically but you’re missing the whole point. Why should you go on trips and see the sights of other places, Google Street View is right there.

    E: real world example, though my network reaches far beyond my driveway so no button required:

    Automation
    alias: Midnight - Travel, Arriving Home
    description: ''
    triggers:
      - trigger: zone
        entity_id: person.midnight
        zone: zone.home
        event: enter
    conditions:
      - condition: state
        entity_id: input_boolean.midnight_awake
        state:
          - 'on'
      - condition: time
        after: '10:00:00'
    actions:
      - if:
          - condition: not
            conditions:
              - alias: Connected to home wifi network
                condition: state
                entity_id: sensor.midnights_phone_wi_fi_connection
                state:
                  - input_text.home_network
        then:
          - wait_for_trigger:
              - trigger: state
                entity_id:
                  - sensor.midnights_phone_wi_fi_connection
                to:
                  - input_text.home_network
            timeout:
              hours: 0
              minutes: 1
              seconds: 0
              milliseconds: 0
            continue_on_timeout: true
      - if:
          - condition: state
            entity_id: light.midnight_s_bedroom
            state:
              - 'off'
        then:
          - action: light.turn_on
            metadata: {}
            target:
              entity_id: light.midnight_s_bedroom
            data:
              brightness_pct: 35
          - action: input_boolean.turn_on
            target:
              entity_id: input_boolean.midnight_s_light_override
            data: {}
          - if:
              - condition: numeric_state
                entity_id: light.midnight_s_bedroom
                attribute: brightness
                below: 35
            then:
              - action: light.turn_on
                metadata: {}
                target:
                  entity_id: light.midnight_s_bedroom
                data:
                  brightness_pct: 35
      - delay:
          hours: 0
          minutes: 0
          seconds: 15
          milliseconds: 0
        enabled: true
      - action: automation.trigger
        metadata: {}
        target:
          entity_id:
            - automation.battery_low
            - automation.midnight_s_bedroom_midnight_s_thermostat_outside_is_cooler
            - automation.midnight_s_bedroom_midnight_s_thermostat_outside_is_warmer
        data:
          skip_condition: false
      - action: tts.speak
        metadata: {}
        target:
          entity_id: tts.piper
        data:
          cache: false
          media_player_entity_id: media_player.midnight_s_bedroom_home_assistant_voice_media_player
          message: Welcome home, Midnight!
    mode: single