Knol010
(Joost)
December 4, 2018, 8:35pm
1
Hello,
I have a Toon thermostate and have services for the temp settings.
If the sun is set (trigger), and the thermostate is set on away (condition), the alarm needs to be set (action)
I can use the service as trigger or set as action but not as condition.
Can someone help me?
sparkydave
(🇦🇺 Dave)
December 4, 2018, 10:03pm
2
sounds like you need to do something like:
condition:
condition: state
entity_id: your.thermostat
state: 'away'
Knol010
(Joost)
December 5, 2018, 7:38am
3
Thanks for you time
This is my automation just to test it:
- alias: Test
hide_entity: true
trigger:
platform: state
entity_id: light.voorraadkast
to: 'on'
condition:
- condition: state
entity_id: climate.toon_van_eneco
state: 'eco'
action:
- service: homeassistant.turn_on
entity_id: switch.schutting
The switch schutting will not go on.
i made a scene where I renamed eco to away.
- alias: Test
trigger:
platform: event
event_type: call_service
event_data:
service_data:
entity_id: scene.toon_weg
domain: scene
service: turn_on
action:
service: homeassistant.turn_off
entity_id: switch.schutting
This is working but as I said I want scene as condition.
sparkydave
(🇦🇺 Dave)
December 5, 2018, 7:48am
4
can you please format your code?
sparkydave
(🇦🇺 Dave)
December 5, 2018, 7:54am
5
a scene is not a state so you wont be able to use it as a condition
Knol010
(Joost)
December 5, 2018, 8:00am
6
Sorry i’m new with this!
So is there a way to get this done?
sparkydave
(🇦🇺 Dave)
December 5, 2018, 8:05am
7
its in my reply as per the banner at the top of this page. highlight your code and use the </> button
Knol010
(Joost)
December 5, 2018, 8:08am
8
I did it. So there is no solution for the condition i want?
sparkydave
(🇦🇺 Dave)
December 5, 2018, 8:11am
9
I’m a little confused at what you want…
this condition-
condition:
- condition: state
entity_id: climate.toon_van_eneco
state: 'eco'
…should work. you cant use a scene as a condition, but you mention trying to change the name via a scene… thats not correct
Knol010
(Joost)
December 5, 2018, 8:13am
10
Yes i want that as condition but is doesn’t work.
No action done after the trigger is set.
sparkydave
(🇦🇺 Dave)
December 5, 2018, 8:21am
11
is the state of climate.toon_van_eneco
actually currently in ‘eco
’?
Knol010
(Joost)
December 5, 2018, 8:52am
14
No i checked the log no errors. I’ll ask the question in a other discussion. Thanks