38 lines
1.8 KiB
YAML
38 lines
1.8 KiB
YAML
virtual_sensors:
|
|
module: virtualsensors
|
|
class: VirtualSensorsApp
|
|
priority: 10 # default priority app is 50, since most of them require sensors created by virtual sensors, it's important that virtual_sensors start first
|
|
|
|
sensors:
|
|
continuous_condition.is_apple_tv_idle:
|
|
time: 5
|
|
conditions: media_player.apple_tv == 'paused' or media_player.apple_tv == 'idle' or media_player.apple_tv == 'standby'
|
|
|
|
binary_sensor.is_apple_tv_on: media_player.apple_tv != 'off'
|
|
binary_sensor.someone_home: person.maeva == 'home' or person.pierre == 'home'
|
|
binary_sensor.is_dark_outside: sun.sun == 'below_horizon'
|
|
|
|
# living room sensors
|
|
value_selector.living_room_ambiance_light:
|
|
values:
|
|
0:
|
|
- not binary_sensor.living_room_occupancy
|
|
- binary_sensor.is_apple_tv_on and not binary_sensor.is_apple_tv_idle
|
|
- light.living_room
|
|
- sensor.mezzanine_motion_light_level > 10
|
|
1: binary_sensor.is_everybody_sleeping
|
|
2: true
|
|
#p1p sensors
|
|
binary_sensor.p1p_is_printing:
|
|
trigger_conditions: sensor.garage_p1p_etat_de_l_impression != 'idle' and sensor.garage_p1p_etat_de_l_impression != 'finish' and sensor.garage_p1p_etat_de_l_impression != 'idle' and sensor.garage_p1p_etat_de_l_impression != 'offline'
|
|
disable_conditions: sensor.garage_p1p_etat_de_l_impression == 'offline' and switch.garage_p1p_plug
|
|
blocking_conditions: not switch.garage_p1p_plug
|
|
binary_sensor.p1p_is_active:
|
|
trigger_conditions:
|
|
- binary_sensor.p1p_is_printing
|
|
- fan.garage_p1p_ventilateur_de_la_chambre or fan.garage_p1p_ventilateur_de_refroidissement
|
|
- sensor.garage_p1p_temperature_cible_de_la_buse > 0 or sensor.garage_p1p_temperature_cible_du_lit > 0
|
|
blocking_conditions: not switch.garage_p1p_plug
|
|
|
|
|