homeassistant/packages/stone_room.yaml

110 lines
3.2 KiB
YAML

# {"Time":"2020-12-08T02:09:02","BME280":{"Temperature":21.5,"Humidity":39.1,"DewPoint":6.9,"Pressure":906.5},"PressureUnit":"hPa","TempUnit":"C"}
homeassistant:
customize:
sensor.stone_room_temperature:
friendly_name: 'Stone Room Temperature'
sensor.stone_room_dew_point_temperature:
friendly_name: 'Stone Room Dew Point Temperature'
sensor.stone_room_humidity:
friendly_name: 'Stone Room Humidity'
# input_number.stone_room_min_temp:
# friendly_name: 'Stone Room Minimum Set Temperature'
input_number:
stone_room_min_temp:
name: 'Stone Room Minimum Set Temperature'
min: 34
max: 50
step: 1
mode: 'box'
sensor:
- platform: mqtt
name: "stone_room_temperature"
state_topic: "tele/stone/SENSOR"
qos: 0
unit_of_measurement: "F"
value_template: "{{ '%.1f'%(value_json.DHT12.Temperature * 9 / 5 + 32 | float) }}"
- platform: mqtt
name: "stone_room_dew_point_temperature"
state_topic: "tele/stone/SENSOR"
qos: 0
unit_of_measurement: "F"
value_template: "{{ '%.1f'%(value_json.DHT12.DewPoint * 9 / 5 + 32 | float) }}"
- platform: mqtt
name: "stone_room_humidity"
state_topic: "tele/stone/SENSOR"
qos: 0
unit_of_measurement: "%"
value_template: "{{ '%.1f'%(value_json.DHT12.Humidity | float) }}"
switch:
- platform: mqtt
name: "Stone Room Heating"
state_topic: "stat/stone/POWER1"
command_topic: "cmnd/stone/POWER1"
availability_topic: "tele/stone/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
retain: false
automation:
- id: stone_room_heater_on
trigger:
platform: state
entity_id: sensor.stone_room_temperature
below: "{{ states('input_number.stone_room_min_temp') | int }}"
for:
minutes: 5
action:
- service: switch.turn_on
entity_id: switch.stone_room_heating
- service: notify.pushsafer
data:
title: "Stone Room Heating On"
message: "Stone Room Heater Has Turned on"
target: ["26583"]
data:
icon: "20"
iconcolor: "#FF00FF"
sound: "33"
vibration: "0"
url: "https://ha.238.kebler.net/"
urltitle: "Open Home Assistant"
time2live: "10"
priority: "2"
retry: "60"
expire: "600"
answer: "1"
- id: stone_room_heater_off
trigger:
platform: state
entity_id: sensor.stone_room_temperature
above: "{{ states('input_number.stone_room_min_temp') + 3 | int }}"
for:
minutes: 5
action:
- service: switch.turn_off
entity_id: switch.stone_room_heating
- service: notify.pushsafer
data:
title: "Stone Room Heating Off"
message: "Stone Room Heater Has Turned Off"
target: ["26583"]
data:
icon: "20"
iconcolor: "#FF00FF"
sound: "33"
vibration: "0"
url: "https://ha.238.kebler.net/"
urltitle: "Open Home Assistant"
time2live: "10"
priority: "2"
retry: "60"
expire: "600"
answer: "1"