I would like to be notified when someone boosted the heating or when the heating is fired due to demand. This will then allow me to decrease the temperature if I feel it’s not needed. (I’m the one paying the bill’s)
I have the notify and ability to decrease the temperature if fired all working perfectly well from my iPhone.
The only issue I’am struggling with is knowing which user boosted the heating whether that be a user or due to demand, but I don’t want a notification if it was me. (user_id: 33e345d6591f46668b1fg4c1232dcb70)
I’ve tried automations and scripts to no avail.
The ‘Boost Heating’ on the UI is an input.button, Im using Climate and this triggers a Tasmota Sonoff relay.
The automation that senses the heating on and triggers the script:
Heating on Monitor
description: ""
triggers:
- trigger: state
entity_id:
- climate.home
attribute: hvac_action
from: idle
to: heating
conditions: []
actions:
- action: notify.mobile_app_trev_s_iphone
data:
title: Automation User
message: |
This: {{ this.context.user_id }}
From state: {{ trigger.from_state.context.user_id }}
To state: {{ trigger.to_state.context.user_id }}
- action: script.turn_on
data: {}
target:
entity_id: script.heating_boost_notify_trevor
mode: single```
The script is here:
Heating on Notify
description: Sends notify when increasing in heating
sequence:
- condition: "{{ context.user_id != '33e345d6591f46668b1fg4c1232dcb70' }}"
- delay:
hours: 0
minutes: 1
seconds: 0
- action: notify.mobile_app_trev_s_iphone
data:
title: Heating on
message: >-
{{ states("sensor.l_temperature") | round(1) }}°C, set for {{
states("sensor.target_temperature") | round(1) }}°C User id: {{
context.user_id }}
data:
actions:
- action: heating_decrease
title: Decrease temp?
- wait_for_trigger:
- event_type: ios.notification_action_fired
event_data:
actionName: heating_decrease
trigger: event
timeout:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
continue_on_timeout: false
- target:
entity_id: switch.heating_down
data: {}
action: switch.turn_on
mode: single```
I’ve experimented in many ways with the context.user_id
hence the notify in the automation, only there to help me try and understand what’s going on.
But I’m now lost on how to achieve this after going round and round. Any ideas or a different approach would be much appreciated.