Hello all,
sorry I am a noob at all of this and am getting a little frustrated. Ive read the documentation and the more I read and try to follow, the more complex things tend to get. I would love to have my zigbee temp sensors check every time to see if the lights on or off, if the status of my light is on, and the temperature is below 75f, turn my heater switch on. The same for if the lights off but temperature below 65, turn the heater on. I had one that was semi working but the heater would never turn off:
Trying to improve it I came up with this:
alias: Temperature Control
description: Adjust heater based on light status and temperature
triggers:
- entity_id: sensor.a48d3723d3a04730169b2441722ad156
below: 80
above: 50
trigger: numeric_state
- entity_id: sensor.2aaa61136557ecc23bfc7e56a92d4eb8
below: 80
above: 50
trigger: numeric_state
- entity_id: switch.e7d17ac9bcc98989d9de963f6aa74feb
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: state
entity_id: switch.e7d17ac9bcc98989d9de963f6aa74feb
state: "on"
- condition: numeric_state
entity_id: sensor.a48d3723d3a04730169b2441722ad156
below: 80
sequence:
- target:
entity_id: switch.fdf1f4f6c68df0f6cbad0e32aed127b3
action: switch.turn_on
data: {}
- conditions:
- condition: state
entity_id: switch.e7d17ac9bcc98989d9de963f6aa74feb
state: "off"
- condition: numeric_state
entity_id: sensor.a48d3723d3a04730169b2441722ad156
below: 65
sequence:
- target:
entity_id: switch.fdf1f4f6c68df0f6cbad0e32aed127b3
action: switch.turn_on
data: {}
- target:
entity_id: switch.fdf1f4f6c68df0f6cbad0e32aed127b3
action: switch.turn_off
data: {}
mode: single
Please note, I upped the temperature to 80 to test (as the lights on and the temperature right now is 77):
alias: Temperature control
description: Low 60, high 70
triggers:
- type: temperature
device_id: 57dbd068f3a37fd49ae6c158fe7d4143
entity_id: a48d3723d3a04730169b2441722ad156
domain: sensor
below: 73
above: 50
trigger: device
- type: temperature
device_id: 58b23f6d7d7eb6ae9f21c4d73ca6b704
entity_id: 2aaa61136557ecc23bfc7e56a92d4eb8
domain: sensor
below: 73
above: 50
trigger: device
conditions:
- condition: device
type: is_on
device_id: d9f01304fdba20139d0f783b31c41240
entity_id: e7d17ac9bcc98989d9de963f6aa74feb
domain: switch
enabled: false
actions:
- type: turn_on
device_id: 75887b41474e0a17ef4c7a528d3c6b11
entity_id: fdf1f4f6c68df0f6cbad0e32aed127b3
domain: switch
mode: single