diff --git a/apps/global/notificationsmanagers.yaml b/apps/global/notificationsmanagers.yaml index 9b97aee..1f066b4 100644 --- a/apps/global/notificationsmanagers.yaml +++ b/apps/global/notificationsmanagers.yaml @@ -7,14 +7,12 @@ notifications_manager: notifications: back_home_notification: recipients: - all: - services: - - notify/mobile_app_ipad_pro_11_de_pierre - conditions: - trigger_conditions: - - person.maeva == 'home' - - binary_sensor.is_bedroom_sleeping and (binary_sensor.hallway_motion or binary_sensor.corridor_motion or binary_sensor.bedroom_motion_bed_pierre) - blocking_conditions: not input_boolean.haw or not binary_sensor.someone_home + away: + services: notify/mobile_app_ipad_pro_11_de_pierre + conditions: input_boolean.haw and person.maeva == 'home' and not binary_sensor.is_bedroom_sleeping + sleeping: + services: notify/mobile_app_ipad_pro_11_de_pierre + conditions: input_boolean.haw and binary_sensor.is_bedroom_sleeping and (binary_sensor.hallway_motion or binary_sensor.corridor_motion or binary_sensor.bedroom_motion_bed_pierre) message: content: Bisous @@ -23,8 +21,7 @@ notifications_manager: leave_home_notification: recipients: all: - services: - - notify/mobile_app_macbook_m3_pro_de_pierre + services: notify/mobile_app_macbook_m3_pro_de_pierre conditions: input_boolean.haw and person.maeva != 'home' and binary_sensor.someone_home message: diff --git a/apps/global/presence.yaml b/apps/global/presence.yaml index d6d9021..0966355 100644 --- a/apps/global/presence.yaml +++ b/apps/global/presence.yaml @@ -38,6 +38,8 @@ occupancy_sensors: trigger_conditions: sensor.living_room_last_motion <= 5 binary_sensor.kitchen_occupancy: trigger_conditions: sensor.kitchen_last_motion <= 5 + binary_sensor.garage_occupancy: + trigger_conditions: sensor.garage_last_motion <= 5 or binary_sensor.garage_entrance or binary_sensor.garage_door binary_sensor.restroom_occupancy: trigger_conditions: sensor.restroom_last_motion <= 3 binary_sensor.bedroom_occupancy: diff --git a/apps/global/virtualsensors.yaml b/apps/global/virtualsensors.yaml index 4d38c2a..4efbf40 100644 --- a/apps/global/virtualsensors.yaml +++ b/apps/global/virtualsensors.yaml @@ -21,5 +21,16 @@ virtual_sensors: - 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 diff --git a/apps/rooms/garage.yaml b/apps/rooms/garage.yaml index 1f7e5d5..0434663 100644 --- a/apps/rooms/garage.yaml +++ b/apps/rooms/garage.yaml @@ -6,3 +6,30 @@ light_garage: smart_conditions: trigger_conditions: sensor.garage_last_motion < 3 blocking_conditions: sensor.garage_motion_light_level > 10 + +p1p_light: + module: smartswitch + class: SmartSwitch + entity: light.garage_p1p_lumiere_de_la_chambre + + smart_conditions: + unavaibility_result: Disabled + trigger_conditions: binary_sensor.garage_occupancy or binary_sensor.garage_p1p_timelapse + blocking_conditions: not binary_sensor.p1p_is_printing and fan.garage_p1p_ventilateur_de_refroidissement <= 0 and fan.garage_p1p_ventilateur_de_la_chambre <= 0 + +p1p_switch: + module: smartswitch + class: SmartSwitch + entity: switch.garage_p1p_plug + + off_conditions: + trigger_conditions: binary_sensor.is_anybody_sleeping or not binary_sensor.someone_home + blocking_conditions: binary_sensor.p1p_is_active + + toggle_events: + garage_button: + event_name: zha_event + event_data: + device_name: 'garage_p1p_button' + args: + attribute_name: on_off