Skip to content

Instantly share code, notes, and snippets.

automation:
- trigger:
platform: state
entity_id: sensor.0x086bd7fffebfe77b_click
to: 'single'
action:
service: light.toggle
entity_id: light.0x086bd7fffe5c89bf_light
binary_sensor:
- platform: template
sensors:
boiler_is_operating_normally:
value_template: "{{ states('sensor.bw_shp8_boiler_power') | int > 1 }}"
utility_meter:
hourly_energy_boiler:
source: sensor.bw_shp8_boiler_total_daily_energy
cycle: hourly
timer:
toilet:
automation:
- alias: Turn on light in the toilet by aqara sensor motion
trigger:
platform: mqtt
topic: zigbee2mqtt/0x00158d0004518e15
condition:
{
"illumination": {
"gain": "8.0",
"gain-factor": "81.4684",
"gain-ratio": "81.4684",
"exposure": "0.0499748",
"sufficientIllumination": "false"
},
"sensor-tilt": {
"enabled": "true",
input_number:
water_counter:
min: 0
max: 100000000
step: 10
unit_of_measurement: liter
icon: mdi:water
current_water_counter:
mode: box
input_boolean:
one:
input_text:
status:
automation:
trigger:
platform: state
entity_id: input_boolean.one
sensor:
- platform: template
sensors:
total_energy_pump:
unit_of_measurement: kWh
value_template: "{{ state_attr('sensor.0x842e14fffe1393a2_power', 'energy') }}"
utility_meter:
hourly_energy_pump:
source: sensor.total_energy_pump
sensor:
- platform: template
sensors:
total_energy_heating_cable:
unit_of_measurement: kWh
value_template: "{{ state_attr('sensor.0x842e14fffe139880_power', 'energy') }}"
binary_sensor:
- platform: template
sensors:
#!/usr/bin/perl
use strict;
use warnings FATAL => 'all';
use feature 'say';
use utf8;
use open qw(:std :utf8);
sub main {