Hello to everyone, I’m new to hass.io and the automation world, but more and more fascinated by the possibilities that can be achieved with this technology. I searched on diverse forums and I put some automation together.
I’m using Home Assistant 2021.3.4 on a Raspberry PI4
I have to automate a simple smart socket in which is plugged a fan heater which has to turn off above 20 degrees and on when it goes above 20. this heater is in my cellar and only has to function when I’m in the cellar. The onboard thermostat isn’t efficient. Smart socket and thermostat both are visible on hass.io.
Any help is much appreciated
I tried two simple automations
- id: '1617816225341'
alias: accendi stufetta sotto 20 gradi
description: ''
trigger:
- platform: numeric_state
entity_id: switch.bf74f7f87c5e736bc5i80w
value_template: '{{ state.attributes.current_temperature }}'
above: '8'
below: '20'
condition:
- condition: device
type: is_on
device_id: f3626e048d86450c33189d59b86c79c5
entity_id: switch.bf71ebbb368150db14rr4g
domain: switch
action:
- type: turn_on
device_id: c074f210f476d6c6045020ca65958a8c
entity_id: switch.bf921f944d22c65e0ehuvq
domain: switch
mode: single
the automation will function only if the other smart socket in the room (pc) is enabled, that means I’m at the computer.
- id: '1617817886648'
alias: spegni stufetta a 20,5 gradi
description: ''
trigger:
- platform: numeric_state
entity_id: switch.bf74f7f87c5e736bc5i80w
above: '20.5'
condition: []
action:
- type: turn_off
device_id: c074f210f476d6c6045020ca65958a8c
entity_id: switch.bf921f944d22c65e0ehuvq
domain: switch
mode: single
this automation seems not to work.