I have an automation configured to turn up the temperature on my Rheem water heater on the first Sunday only to its maximum temperature. Below is the configuration that I found on this forum for the trigger but it seems to start the water heater every morning, not on the first sunday. Can anybody help with getting this correctly configured?
{{ now().isoweekday() == 7 and now().day < 8 }}
I am still very much learning all this, but I have found using the calendar to do things like this, for example I turn on all the chargers to the blinds for 3 hours once a week, very easy to do on the calendar.
Understood, but the calendar is only for recurring events during the month or week. My intent is to only activate the water heater on the first Sunday of the month and the calendar doesn’t seem to have the tools for this.
Paste the YAML (correctly formatted) for your complete automation that “starts every morning”.
The template you have posted should return true
if it’s the first Sunday of the month, so something like this should be fine, firing at 06:00 every day but only getting to the action on the first Sunday:
trigger:
- platform: time
at: "06:00:00"
condition:
- "{{ now().isoweekday() == 7 and now().day < 8 }}"
action:
[YOUR ACTION HERE]
Thanks, I’ll give it a try and report back here with results
Hi, yes you can, I just tested it and as you can see it is on the first Sunday…
I did this using repeat then choosing as below… Every month on the 1 Sunday
Take care.
So I think I have it correct to change the temp on the water heater on first Sunday of the month, here is the yaml
alias: Water Heater 140 on first Sunday
description: “”
trigger:
platform: calendar
event: start
offset: “-0:15:0”
entity_id: calendar.household
condition:
action:
service: water_heater.set_temperature
data:
temperature: 140
target:
entity_id: water_heater.electric_water_heater_2
device_id: dfd8befc1b4e27b7ee9c1bcb992d1eb6
domain: mobile_app
type: notify
message: First Sunday water heater set to 140
service: notify.mobile_app_motorola_razr_plus_2023
data:
title: Notify water heater 140
message: >-
Event {{ trigger.calendar_event.summary }} starts at {{
trigger.calendar_event.start }}
mode: single
As per my prior post, please format code correctly.
Looks ok but difficult to tell in this format, as Troon said if you could copy the yaml and paste it between, ` *3 on my keyboard its the one to the left of the 1 key on the top.
like this
It will then come out like this…
code here
It makes it easy to check for you.
Thanks