Skip to content

Instantly share code, notes, and snippets.

@chmutoff
Last active Feb 9, 2022
Embed
What would you like to do?
Digoo DG-R8S Home Assistant integration using Pilight gateway
- alias: "DIGOO R8S"
description: "DIGOO R8S Remote Sensor"
trigger:
- platform: mqtt
topic: "home/OpenMQTTGateway_ESP8266_Pilight/PilighttoMQTT"
condition:
- condition: template
value_template: "{{ trigger.payload_json.protocol == 'tfa' }}"
- condition: template
value_template: '{{ trigger.payload_json.message.temperature > -10 }}'
action:
- service: mqtt.publish
data:
topic: "home/digoo/r8s/{{ trigger.payload_json.message.channel }}"
payload: "{{ trigger.payload }}"
mode: single
sensor:
- platform: mqtt
state_topic: "home/digoo/r8s/1"
name: "Temperature 1"
value_template: "{{ value_json.message.temperature }}"
unit_of_measurement: "°C"
icon: mdi:thermometer
expire_after: 900
force_update: true
device_class: temperature
state_class: measurement
- platform: mqtt
state_topic: "home/digoo/r8s/1"
name: "Humidity 1"
value_template: "{{ value_json.message.humidity }}"
unit_of_measurement: "%"
icon: mdi:water-percent
expire_after: 900
device_class: humidity
force_update: true
state_class: measurement
- platform: mqtt
state_topic: "home/digoo/r8s/2"
name: "Temperature 2"
value_template: "{{ value_json.message.temperature }}"
unit_of_measurement: "°C"
icon: mdi:thermometer
expire_after: 900
force_update: true
device_class: temperature
state_class: measurement
- platform: mqtt
state_topic: "home/digoo/r8s/2"
name: "Humidity 2"
value_template: "{{ value_json.message.humidity }}"
unit_of_measurement: "%"
icon: mdi:water-percent
expire_after: 900
force_update: true
device_class: humidity
state_class: measurement
- platform: mqtt
state_topic: "home/digoo/r8s/3"
name: "Temperature 3"
value_template: "{{ value_json.message.temperature }}"
unit_of_measurement: "°C"
icon: mdi:thermometer
expire_after: 900
force_update: true
device_class: temperature
state_class: measurement
- platform: mqtt
state_topic: "home/digoo/r8s/3"
name: "Humidity 3"
value_template: "{{ value_json.message.humidity }}"
unit_of_measurement: "%"
icon: mdi:water-percent
expire_after: 900
force_update: true
device_class: humidity
state_class: measurement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment