Hello,
i’d need some help with a couple of automations i can’t get to work as needed
i have a zigbee valve for watering my garden. I “basically” works, but rarely (i’d say once a month) it does not close (i think it’s a matter of water pressure?) so it goes on watering also after the end of the schedule. In this case, the valve is reported as correctly closed, but the water consumption sensor goes on counting. So i want an automation that finds out when. with the valve closed, the consumption sums up. So, throught the loved old “copy and paste”, i tried with something like this, that obviously does not work (i get a notification every night exactly when the schedule ends). Probably it’s the “last” increase when the valve gets closed that comes AFTER the closing event, but i don’t know how to insert a “delay” in this.
since my wife has some relationship problems with Alexa and is able to turn on EVERITHING when trying to do something totally different (lol) i set up an automation to notify when AC is turned on. This basically works, but i get notifications also when the AC controller goes unavailable and gets back available (e.g. when i restart the wifi ap). How can i exclude this?
alias: Notifica condizionatore
description: ""
trigger:
- platform: state
entity_id:
- climate.study_ac
attribute: hvac_action
from: "off"
- platform: state
entity_id:
- climate.living_ac
attribute: hvac_action
from: "off"
- platform: state
entity_id:
- climate.bedroom_ac
attribute: hvac_action
from: "off"
condition: []
action:
- data:
title: AC On
message: AC has been turned on
action: notify.mobile_app_massicell
mode: single
For your second question, do you just need to add to: "on" like this:
alias: Notifica condizionatore
description: ""
trigger:
- platform: state
entity_id:
- climate.study_ac
attribute: hvac_action
from: "off"
to: "on"
- platform: state
entity_id:
- climate.living_ac
attribute: hvac_action
from: "off"
to: "on"
- platform: state
entity_id:
- climate.bedroom_ac
attribute: hvac_action
from: "off"
to: "on"
condition: []
action:
- data:
title: AC On
message: AC has been turned on
action: notify.mobile_app_massicell
mode: single
You may want to remove the from: "off" keys as this will prevent the automation triggering when the state goes from unavailable to on
hello,
thanks, but i’m not sure this is gonna work. Climate entities doesn’t even have a “on” state (at least, explicit), do you think this can be used to cover all possible states? (cooling, heating, fan, etc)? I can’t select something like that from GUI
Could you try making a new automation without the for: and without the conditions and have this send you a notification that shows you what the before and after trigger states are.
it seems you can’t use to: and not_to together
but it seems this works:
alias: Notifica condizionatore
description: ""
trigger:
- platform: state
entity_id:
- climate.study_ac
attribute: hvac_action
from: "off"
to:
- cooling
- heating
- fan
- drying
- idle
- platform: state
entity_id:
- climate.living_ac
attribute: hvac_action
from: "off"
to:
- cooling
- heating
- fan
- drying
- idle
- platform: state
entity_id:
- climate.bedroom_ac
attribute: hvac_action
from: "off"
to:
- cooling
- heating
- fan
- drying
- idle
condition: []
action:
- data:
title: AC On
message: >-
{{ trigger.to_state.name }} has been turned to {{ trigger.to_state.state
}}
action: notify.mobile_app_massicell
mode: single
i have to admin it’s not totally clear the coherence of values: i’m filtering the climate states, and i have to insert basically the action (e.g.: COOLING), but when the notification is sent and it sends the actual state, it sends COOL.
For the second automation, stupid me, it was enough to force in conditions that the valve was off for some seconds…
Call me crazy, but This all might fix your problem fine. My experience with a device that has an assumed state (RF plugs that are fire and forget to an assumed state) I simply turn them on or off 3 times. That usually get’s it done. Repeat the on or off action multiple times.