-
Notifications
You must be signed in to change notification settings - Fork 8
/
binary_sensor.yaml
26 lines (22 loc) · 1.15 KB
/
binary_sensor.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
#### Binary sensors EV Charging ########
- platform: template
sensors:
# True if power is over 2000W {{ 1500 < states('sensor.shelly_em_channel_1_power') | float(0) < 2500 }}
ev_charging_onoff_2kw:
friendly_name: 'EV is Charging with 2 kW'
value_template: "{{ 1500 < states('sensor.shelly_em_channel_1_power') | float(0) < 2500 }}"
device_class: battery_charging
# True if power is over 3000W
ev_charging_onoff_3_5kw:
friendly_name: 'EV is Charging with 3.5 kW'
value_template: "{{states.sensor.shelly_em_channel_1_power.state|float(0) > 3000}}"
device_class: battery_charging
ev_charging_onoff:
friendly_name: 'EV is Charging'
value_template: "{{is_state('binary_sensor.ev_charging_onoff_3_5kw' , 'on') or is_state('binary_sensor.ev_charging_onoff_2kw' , 'on')}}"
device_class: battery_charging
ev_charging_onoff_test:
friendly_name: 'EV is Charging test3kw'
value_template: "{{is_state('binary_sensor.ev_charging_onoff_3_5kw', 'on')}}"
device_class: battery_charging
# message: K garage is {{ 'Open' if is_state('binary_sensor.ev_charging_onoff_3_5kw', 'on') else 'Closed' }}