I have two temperature sensors (433mhz) which identify themselves as Viking 02811. I have added them to HA and values are displayed in graphs. But there are no events to react on.
Reading the documentation, I find this text, talking about the fire_event parameter. How to I set this?
If you have the state of the entity to show in graps, you can react on state changes. You don’t need events for that.
I solved this by creating a template binary sensor with the two temp sensors. If any of the temps are warmer than -15 C the sensor turns on:
name: freezes_temp_too_high
state: "{{ (float(states('sensor.termometer_frys_nere_temperature'))) > -15 or (float(states('sensor.termometer_frys_uppe_temperature'))) > -15 }}"
device_class: problem
Then I used that sensor in an Alert-automation:
freezes:
name: "Freeze alert"`
message: |+
Frysarna varma!`
Termometer uppe: {{ (states('sensor.termometer_frys_uppe_temperature')) }}
Termometer nere: {{ (states('sensor.termometer_frys_nere_temperature')) }}
done_message: |+
Frysarna återställda!
Termometer uppe: {{ (states('sensor.termometer_frys_uppe_temperature')) }}
Termometer nere: {{ (states('sensor.termometer_frys_nere_temperature')) }}
entity_id: binary_sensor.freezes_temp_too_high
state: "on"
repeat: 5
skip_first: false
notifiers:
- pfb
Once triggered, the integration will run every 5 minutes and send me the message. If sensor turns off (temperature it back under -15), I will receive the done_message