Hi! I’m trying to use a simple automation that turns on A/C on dry mode when the temperature read from the A/C sensor is above 25°C.
The manual test is working fine, but it doesn’t triggered automatically.
Any idea?
Hi! I’m trying to use a simple automation that turns on A/C on dry mode when the temperature read from the A/C sensor is above 25°C.
The manual test is working fine, but it doesn’t triggered automatically.
Any idea?
Welcome to the forums.
Its normally protocol to paste the yaml version of your automation in a preformatted text block so others can understand whats going on. You can do this by switching from the visual editor to yaml mode when editting the automation.
However, looking at your screen your entity name looks odd:
Normally, entities names tend to have more friendly names which are created when you add the device. But this could be a red herring.
its important to note that the screenshot you’ve supplied, uses a trigger that relies on the value being measured crossing a threshold, so in this case, from 25 to 26. Only then will the A/C turn on (assuming no other issues with your script). So if the A/C for some reason is off and its ALREADY (say) 26 degrees, and then goes to 27,28… etc, the script will never execute because it didnt go across the threshold.
Is this what you intended ? is it possible this has happened because someones manually turned off the A/C ?
You might instead simply want to change your trigger so that the automation fires when the state of the temperature changes to ANY value, then use a numeric state condition to only continue if the temperature is at or above a certain level. This way you’re not required to cross the threshold for the automation to fire.
In the screenshot above there is no trigger so it won’t ever trigger !
I was trying to keep it simple just to test it, but this is what i want to achive:
i want to turn on the A/C on dry mode when the measured temperature is above 26°C and turn it off when measured temperature drops below 24°C. I need this to happen only from 23:00 (11 pm) to 07:00 (7am)
You’ll need to change this to your devices and entities, but something like this:
description: ""
mode: single
trigger:
- type: temperature
platform: device
device_id: sdfsfsfd
entity_id: sensor.lumi_lumi_weather_temperature_4
domain: sensor
above: 24
id: above
- type: temperature
platform: device
device_id: etreterytert
entity_id: sensor.lumi_lumi_weather_temperature_4
domain: sensor
id: below
below: 25
condition: []
action:
- if:
- condition: trigger
id: above
then:
- service: climate.set_hvac_mode
data:
hvac_mode: dry
target:
entity_id: climate.downstairs_bathroom_thermostat
else:
- service: climate.set_hvac_mode
data:
hvac_mode: "off"
target:
entity_id: climate.downstairs_bathroom_thermostat
I missed adding the time condition part, but that should be pretty straightfoward
alias: Accendi Clima
description: ""
trigger:
- type: temperature
platform: device
device_id: 21b9e1ebae205b0aac92ce1d8825ee24
entity_id: climate.1ef7b915
domain: sensor
above: 24
id: above
- type: temperature
platform: device
device_id: 21b9e1ebae205b0aac92ce1d8825ee24
entity_id: climate.1ef7b915
domain: sensor
id: below
below: 25
condition: []
action:
- if:
- condition: trigger
id: above
then:
- service: climate.set_hvac_mode
data:
hvac_mode: dry
target:
entity_id: climate.1ef7b915
else:
- service: climate.set_hvac_mode
data:
hvac_mode: "off"
target:
entity_id: climate.1ef7b915
mode: single
tried to add device and entity, but in visual editor, under trigger, i have “Unknow trigger”, so it’s not firing
i’ve changed the starting hour to make a test. Despite having a recorded temperature of 31°, the automation still doesn’t work. I’ve also tried a manual run, but nothing.
So, i changed a little bit the action to this:
action:
- device_id: 21b9e1ebae205b0aac92ce1d8825ee24
domain: climate
entity_id: climate.1ef7b915
type: set_hvac_mode
hvac_mode: dry
and running it manually the A/C turns on, but it won’t automatically
yes, i was thinking about that. So there isn’t a way to read the temperature like every 10 or 15 minutes, and if it’s above or below a certain value it will turn on/off the A/C?
Hi. I’m having the exact same problem whereby it doesn’t trigger if the temperature doesn’t cross the threshold. Did you manage to resolve this? ie add some kind of polling every x minutes
Thanks
polling is rarely the right answer. the question is… If it doesn’t cross the threshold, then what should signal it to be turned on? I mean “something” turned it off ( except in the very first case when you first write the automation if the temp was already past the threshold… But let’s ignore that for a min)…
if the automation did the right thing when it first crossed the threshold, something turned it off (someone manually?)… When should it turn back on?