-
Notifications
You must be signed in to change notification settings - Fork 0
/
tasmota_sensors.yaml
80 lines (76 loc) · 2.56 KB
/
tasmota_sensors.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# tasmota_sensors.yaml
#
# Copyright (C) 2022-2024 Daniele Bochicchio, All Rights Reserved
# For updates see https://github.com/dbochicchio/reactor-mqtt-contrib
#
# *** IMPORTANT ***
# Every time you update the files, a restart is needed.
---
templates:
tasmota_wifi:
type: ValueSensor
capabilities: ["wifi_status"]
requires: [topic, source]
description: Tasmota Wifi Template - do not use directly
lwt: "tele/%topic%/LWT"
query: "cmnd/%topic%/STATE"
events:
"tele/%topic%/STATE":
"wifi_status.rssi":
json_payload: true
expr: 'payload?.Wifi?.RSSI'
"wifi_status.ssid":
json_payload: true
expr: 'payload?.Wifi?.SSId'
"wifi_status.station_ip":
json_payload: true
expr: "payload?.Wifi?.ip"
"tasmota/discovery/%topic%/config":
"wifi_status.station_ip":
json_payload: true
expr: "payload?.ip"
# tasmota with pressure sensor
tasmota_sensor_pressure:
type: ValueSensor
capabilities: ["value_sensor", "wifi_status"]
primary_attribute: value_sensor.value
requires: [topic, source]
description: Tasmota device with barometric pressure sensor
include:
- tasmota_wifi
events:
"tele/%topic%/SENSOR":
"value_sensor.value":
json_payload: true
if_expr: "! isnull( payload?[ source ?? 'Global' ] )"
expr: "payload[ source ?? 'Global' ]?.Pressure"
"value_sensor.units":
json_payload: true
if_expr: "! isnull( payload?.PressureUnit )"
expr: payload.PressureUnit
"x_mqtt_device.online": true
# tasmota with illuminance
tasmota_sensor_illuminance:
type: ValueSensor
capabilities: ["light_sensor", "wifi_status"]
primary_attribute: light_sensor.value
requires: [topic, source]
description: Tasmota device with illuminance sensor
include:
- tasmota_wifi
events:
"tele/%topic%/SENSOR":
"light_sensor.value":
json_payload: true
if_expr: "! isnull( payload?[ source ?? 'Global' ] )"
expr: "payload[ source ?? 'Global' ]?.Illuminance"
"light_sensor.units": "lux"
"x_mqtt_tasmota_ir.value":
json_payload: true
if_expr: "! isnull( payload?[ source ?? 'Global' ] )"
expr: "payload[ source ?? 'Global' ]?.IR"
"x_mqtt_tasmota_broadband.value":
json_payload: true
if_expr: "! isnull( payload?[ source ?? 'Global' ] )"
expr: "payload[ source ?? 'Global' ]?.Broadband"
"x_mqtt_device.online": true