Helps automation I have created

- alias: 0030_to_0430_charge_car
  trigger:
    platform: time
    at: '04:30:00'   
  condition:
    - condition: state
      entity_id: sensor.zappi_charge_added
  Action:    
    - service: notify.mobile_app_BertybassettiPhone12
      data:
        message: "{{ states.sensor.zappi_charge_added.state }} kWh of charge have been added to your Telsa Model 3" 

How does one only send a message at 4:30 if the sensor.zappi_charge_added has changed

Changed since when?

The current hour, day, week, year?

let me rephrase at 04:30 if entity_id: sensor.zappi_charge_added has changed in the last day then notify

This will only message you if it has changed in the last 24 hours (86400 seconds)

- alias: 0030_to_0430_charge_car
  trigger:
    platform: time
    at: '04:30:00'   
  condition:
    condition: template
    value_template: "{{ (as_timestamp(now()) - as_timestamp(states.sensor.zappi_charge_added.last_changed)) < 86400 }}"
  Action:    
    - service: notify.mobile_app_BertybassettiPhone12
      data:
        message: "{{ states.sensor.zappi_charge_added.state }} kWh of charge have been added to your Telsa Model 3"
1 Like