Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - sensor:
- - name: "All Conditions Met"
- state: >
- {% set conditions = [
- states('lock.pja1_lock') == 'locked',
- states('binary_sensor.pja1_tire_warning') == 'off',
- states('binary_sensor.pja1_low_wash_water_warning') == 'off',
- states('binary_sensor.pja1_low_brake_fluid_warning') == 'off',
- states('sensor.pja1_sunroof_status') == '0',
- states('sensor.pja1_front_left_window') == '2',
- states('sensor.pja1_front_right_window') == '2',
- states('sensor.pja1_rear_left_window') == '2',
- states('sensor.pja1_rear_right_window') == '2',
- states('binary_sensor.pja1_front_left_door_open') == 'off',
- states('binary_sensor.pja1_front_right_door_open') == 'off',
- states('binary_sensor.pja1_rear_left_door_open') == 'off',
- states('binary_sensor.pja1_rear_right_door_open') == 'off',
- states('binary_sensor.pja1_decklid_open') == 'off',
- states('binary_sensor.pja1_hood_open') == 'off',
- states('binary_sensor.pja1_preclimate_status') == "off",
- (states('lock.fpa1_lock') == 'locked' or states('device_tracker.fpa1_device_tracker') == 'home'),
- states('binary_sensor.fpa1_tire_warning') == 'off',
- states('binary_sensor.fpa1_low_wash_water_warning') == 'off',
- states('binary_sensor.fpa1_low_brake_fluid_warning') == 'off',
- states('binary_sensor.fpa1_low_coolant_fluid_warning') == 'off',
- states('sensor.fpa1_sunroof_status') == '0',
- states('sensor.fpa1_front_left_window') == '2',
- states('sensor.fpa1_front_right_window') == '2',
- states('sensor.fpa1_rear_left_window') == '2',
- states('sensor.fpa1_rear_right_window') == '2',
- states('binary_sensor.fpa1_front_right_door_open') == 'off',
- states('binary_sensor.fpa1_rear_left_door_open') == 'off',
- states('binary_sensor.fpa1_rear_right_door_open') == 'off',
- states('binary_sensor.fpa1_decklid_open') == 'off',
- states('binary_sensor.fpa1_hood_open') == 'off',
- states('binary_sensor.kitchen_door_wall_sensor_2') == 'off',
- states('binary_sensor.generac_1057423_is_connected') == 'on',
- states('binary_sensor.garage_fridge_2') == 'off',
- states('cover.smart_garage_door_23100870148e1e9dd4521_garage_1') == 'closed',
- states('cover.smart_garage_door_231008778410148e1e9dd4521_garage_2') == 'closed'
- ] %}
- {{ conditions | reject('equalto', false) | list | count == 0 }}
- - name: "Unmet Conditions List"
- state: >
- {% set unmet_conditions = [] %}
- {% if states('lock.pja1_lock') != 'locked' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Lock'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_tire_warning') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Tire Warning'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_low_wash_water_warning') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Low Wash Water Warning'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_low_brake_fluid_warning') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Low Brake Fluid Warning'] %}
- {% endif %}
- {% if states('sensor.pja1_sunroof_status') != '0' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Sunroof Status'] %}
- {% endif %}
- {% if states('sensor.pja1_front_left_window') != '2' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Front Left Window'] %}
- {% endif %}
- {% if states('sensor.pja1_front_right_window') != '2' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Front Right Window'] %}
- {% endif %}
- {% if states('sensor.pja1_rear_left_window') != '2' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Rear Left Window'] %}
- {% endif %}
- {% if states('sensor.pja1_rear_right_window') != '2' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Rear Right Window'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_front_left_door_open') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Front Left Door'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_front_right_door_open') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Front Right Door'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_rear_left_door_open') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Rear Left Door'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_rear_right_door_open') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Rear Right Door'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_decklid_open') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Trunk Open'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_engine_hood_open') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['PJA1 Hood'] %}
- {% endif %}
- {% if states('lock.fpa1_lock') != 'locked' and states('device_tracker.fpa1_device_tracker') != 'home' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Lock'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_tire_warning') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Tire Warning'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_low_wash_water_warning') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Low Wash Water Warning'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_low_brake_fluid_warning') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Low Brake Fluid Warning'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_low_coolant_level_warning').strip() != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Low Coolant Fluid Warning'] %}
- {% endif %}
- {% if states('sensor.fpa1_sunroof_status') != '0' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Sunroof Status'] %}
- {% endif %}
- {% if states('sensor.fpa1_front_left_window') != '2' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Front Left Window'] %}
- {% endif %}
- {% if states('sensor.fpa1_front_right_window') != '2' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Front Right Window'] %}
- {% endif %}
- {% if states('sensor.fpa1_rear_left_window') != '2' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Rear Left Window'] %}
- {% endif %}
- {% if states('sensor.fpa1_rear_right_window') != '2' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Rear Right Window'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_front_left_door_open') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Front Left Door'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_front_right_door_open') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Front Right Door'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_rear_left_door_open') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Rear Left Door'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_rear_right_door_open') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Rear Right Door'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_decklid_open') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Trunk Open'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_engine_hood_open') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['FPA1 Hood'] %}
- {% endif %}
- {% if states('cover.smart_garage_door_23100877841e9dd4521_garage_1').strip() != 'closed' %}
- {% set unmet_conditions = unmet_conditions + ['Full Garage Open'] %}
- {% endif %}
- {% if states('cover.smart_garage_door_23100877841e9dd4521_garage_2').strip() != 'closed' %}
- {% set unmet_conditions = unmet_conditions + ['Half Garage Open'] %}
- {% endif %}
- {% if states('binary_sensor.kitchen_door_wall_sensor_2') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['Kitchen Doorwall Unlocked'] %}
- {% endif %}
- {% if states('binary_sensor.garage_fridge_2') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['Garage Fridge Open'] %}
- {% endif %}
- {% if states('binary_sensor.generac_1057423_is_connected') != 'on' %}
- {% set unmet_conditions = unmet_conditions + ['Generac Not Connected'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_preclimate_status') != 'off' %}
- {% set unmet_conditions = unmet_conditions + ['EQE Preclimate Status Active'] %}
- {% endif %}
- {{ unmet_conditions | join(', ') }}
- - name: "Unmet Car Conditions"
- state: >
- {% set unmet_car_conditions = [] %}
- {% if states('lock.pja1_lock') != 'locked' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Lock'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_tire_warning') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Tire Warning'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_low_wash_water_warning') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Low Wash Water Warning'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_low_brake_fluid_warning') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Low Brake Fluid Warning'] %}
- {% endif %}
- {% if states('sensor.pja1_sunroof_status') != '0' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Sunroof Status'] %}
- {% endif %}
- {% if states('sensor.pja1_front_left_window') != '2' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Front Left Window'] %}
- {% endif %}
- {% if states('sensor.pja1_front_right_window') != '2' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Front Right Window'] %}
- {% endif %}
- {% if states('sensor.pja1_rear_left_window') != '2' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Rear Left Window'] %}
- {% endif %}
- {% if states('sensor.pja1_rear_right_window') != '2' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Rear Right Window'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_front_left_door_open') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Front Left Door'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_front_right_door_open') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Front Right Door'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_rear_left_door_open') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Rear Left Door'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_rear_right_door_open') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Rear Right Door'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_decklid_open') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Decklid'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_engine_hood_open') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Hood'] %}
- {% endif %}
- {% if states('lock.fpa1_lock') != 'locked' and states('device_tracker.fpa1_device_tracker') != 'home' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Lock'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_tire_warning') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Tire Warning'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_low_wash_water_warning') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Low Wash Water Warning'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_low_brake_fluid_warning') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Low Brake Fluid Warning'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_low_coolant_level_warning').strip() != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Low Coolant Fluid Warning'] %}
- {% endif %}
- {% if states('sensor.fpa1_sunroof_status') != '0' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Sunroof Status'] %}
- {% endif %}
- {% if states('sensor.fpa1_front_left_window') != '2' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Front Left Window'] %}
- {% endif %}
- {% if states('sensor.fpa1_front_right_window') != '2' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Front Right Window'] %}
- {% endif %}
- {% if states('sensor.fpa1_rear_left_window') != '2' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Rear Left Window'] %}
- {% endif %}
- {% if states('sensor.fpa1_rear_right_window') != '2' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Rear Right Window'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_front_left_door_open') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Front Left Door'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_front_right_door_open') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Front Right Door'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_rear_left_door_open') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Rear Left Door'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_rear_right_door_open') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Rear Right Door'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_decklid_open') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Decklid'] %}
- {% endif %}
- {% if states('binary_sensor.fpa1_engine_hood_open') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Hood'] %}
- {% endif %}
- {% if states('binary_sensor.pja1_preclimate_status') != 'off' %}
- {% set unmet_car_conditions = unmet_car_conditions + ['EQE Preclimate Status Active'] %}
- {% endif %}
- {{ unmet_car_conditions | join(', ') }}
- - name: "PJA1 Front Left Window"
- state: "{{ state_attr('binary_sensor.pja1_windows_closed', 'windowstatusfrontleft') }}"
- device_class: enum
- - name: "PJA1 Front Right Window"
- state: "{{ state_attr('binary_sensor.pja1_windows_closed', 'windowstatusfrontright') }}"
- device_class: enum
- - name: "PJA1 Rear Left Window"
- state: "{{ state_attr('binary_sensor.pja1_windows_closed', 'windowstatusrearleft') }}"
- device_class: enum
- - name: "PJA1 Rear Right Window"
- state: "{{ state_attr('binary_sensor.pja1_windows_closed', 'windowstatusrearright') }}"
- device_class: enum
- - name: "FPA1 Front Left Window"
- state: "{{ state_attr('binary_sensor.fpa1_windows_closed', 'windowstatusfrontleft') }}"
- device_class: enum
- - name: "FPA1 Front Right Window"
- state: "{{ state_attr('binary_sensor.fpa1_windows_closed', 'windowstatusfrontright') }}"
- device_class: enum
- - name: "FPA1 Rear Left Window"
- state: "{{ state_attr('binary_sensor.fpa1_windows_closed', 'windowstatusrearleft') }}"
- device_class: enum
- - name: "FPA1 Rear Right Window"
- state: "{{ state_attr('binary_sensor.fpa1_windows_closed', 'windowstatusrearright') }}"
- device_class: enum
- - name: "PJA1 Charging Power Valid"
- state: >
- {% set charging_power = states('sensor.pja1_charging_power').strip() | float(default=0) %}
- {% if charging_power > 1 %}
- charging
- {% else %}
- idle
- {% endif %}
- - name: "Fireplace Status"
- state: >
- {% if is_state('light.family_room_fireplace', 'on') %}
- on
- {% else %}
- off
- {% endif %}
- - binary_sensor:
- - name: "PJA1 Front Left Door Open"
- state: "{{ state_attr('sensor.pja1_lock', 'doorstatusfrontleft') }}"
- device_class: door
- - name: "PJA1 Front Right Door Open"
- state: "{{ state_attr('sensor.pja1_lock', 'doorstatusfrontright') }}"
- device_class: door
- - name: "PJA1 Rear Left Door Open"
- state: "{{ state_attr('sensor.pja1_lock', 'doorstatusrearleft') }}"
- device_class: door
- - name: "PJA1 Rear Right Door Open"
- state: "{{ state_attr('sensor.pja1_lock', 'doorstatusrearright') }}"
- device_class: door
- - name: "PJA1 Decklid Open"
- state: "{{ state_attr('sensor.pja1_lock', 'decklidstatus') }}"
- device_class: door
- - name: "FPA1 Front Left Door Open"
- state: "{{ state_attr('sensor.fpa1_lock', 'doorstatusfrontleft') }}"
- device_class: door
- - name: "FPA1 Front Right Door Open"
- state: "{{ state_attr('sensor.fpa1_lock', 'doorstatusfrontright') }}"
- device_class: door
- - name: "FPA1 Rear Left Door Open"
- state: "{{ state_attr('sensor.fpa1_lock', 'doorstatusrearleft') }}"
- device_class: door
- - name: "FPA1 Rear Right Door Open"
- state: "{{ state_attr('sensor.fpa1_lock', 'doorstatusrearright') }}"
- device_class: door
- - name: "FPA1 Decklid Open"
- state: "{{ state_attr('sensor.fpa1_lock', 'decklidstatus') }}"
- device_class: door
- - name: "FPA1 Engine Hood Open"
- state: "{{ state_attr('sensor.fpa1_lock', 'engineHoodStatus') }}"
- device_class: door
- - name: "PJA1 Engine Hood Open"
- state: "{{ state_attr('sensor.pja1_lock', 'engineHoodStatus') }}"
- device_class: door
Advertisement
Add Comment
Please, Sign In to add comment