Compare commits
5 Commits
3ed4f02da9
...
d49f17b5a7
Author | SHA1 | Date | |
---|---|---|---|
d49f17b5a7 | |||
6b8390befc | |||
f69ebb73b1 | |||
c98436bd08 | |||
cd59673383 |
104
availability.yml
Normal file
104
availability.yml
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
availability:
|
||||||
|
- update.3d_printer_button_firmware
|
||||||
|
- update.3d_printer_enclosure_fan_firmware
|
||||||
|
- update.3d_printer_smoke_sensor_firmware
|
||||||
|
- update.ac_power_firmware
|
||||||
|
- update.access_point
|
||||||
|
- update.bathroom_1_firmware
|
||||||
|
- update.bathroom_2_firmware
|
||||||
|
- update.bathroom_3_firmware
|
||||||
|
- update.bathroom_4_firmware
|
||||||
|
- update.bathroom_color_left_firmware
|
||||||
|
- update.bathroom_color_middle_firmware
|
||||||
|
- update.bathroom_color_right_firmware
|
||||||
|
- update.bathroom_mirror_1_firmware
|
||||||
|
- update.bathroom_mirror_2_firmware
|
||||||
|
- update.bathroom_mirror_3_firmware
|
||||||
|
- update.bathroom_motion_firmware
|
||||||
|
- update.bathroom_music_button_firmware
|
||||||
|
- update.bathroom_thermostat_firmware
|
||||||
|
- update.bedroom_bed_button_firmware
|
||||||
|
- update.bedroom_blind_left_firmware
|
||||||
|
- update.bedroom_blind_right_firmware
|
||||||
|
- update.bedroom_blinds_button_firmware
|
||||||
|
- update.bedroom_button_firmware
|
||||||
|
- update.bedroom_mitv_firmware
|
||||||
|
- update.bedroom_motion_firmware
|
||||||
|
- update.bedroom_tv_button_firmware
|
||||||
|
- update.bt_proxy_1_firmware
|
||||||
|
- update.bt_proxy_bathroom_firmware
|
||||||
|
- update.computer_button_firmware
|
||||||
|
- update.computer_outlet_firmware
|
||||||
|
- update.custom_deps_deployment_update
|
||||||
|
- update.dining_blind_back_firmware
|
||||||
|
- update.dining_blind_left_firmware
|
||||||
|
- update.dining_blind_middle_firmware
|
||||||
|
- update.dining_blind_right_firmware
|
||||||
|
- update.dining_blinds_controller_button_firmware
|
||||||
|
- update.dining_plants_leak_sensor_firmware
|
||||||
|
- update.eps32_rack_control_firmware
|
||||||
|
- update.esp_rack_fans_firmware
|
||||||
|
- update.esphome_update
|
||||||
|
- update.file_editor_update
|
||||||
|
- update.fridge_leak_sensor_firmware
|
||||||
|
- update.frigate_server
|
||||||
|
- update.front_door_lock_button_firmware
|
||||||
|
- update.front_door_lock_firmware
|
||||||
|
- update.hallway_button_firmware
|
||||||
|
- update.hallway_light_firmware
|
||||||
|
- update.home_assistant_core_update
|
||||||
|
- update.home_assistant_operating_system_update
|
||||||
|
- update.home_assistant_supervisor_update
|
||||||
|
- update.humidifier_firmware
|
||||||
|
- update.humidifier_leak_firmware
|
||||||
|
- update.ikea_of_sweden_tradfri_driver_10w_firmware
|
||||||
|
- update.kitchen_big_light_firmware
|
||||||
|
- update.kitchen_button_firmware
|
||||||
|
- update.kitchen_dishwasher_firmware
|
||||||
|
- update.kitchen_sink_button_firmware
|
||||||
|
- update.kitchen_sink_leak_sensor_firmware
|
||||||
|
- update.kvm_firmware
|
||||||
|
- update.lego_bookcase_firmware
|
||||||
|
- update.mac_mini_firmware
|
||||||
|
- update.mosquitto_broker_update
|
||||||
|
- update.nas_firmware
|
||||||
|
- update.network_ups_tools_update
|
||||||
|
- update.node_26_firmware
|
||||||
|
- update.node_27_firmware
|
||||||
|
- update.node_29_firmware
|
||||||
|
- update.office_air_quality_firmware
|
||||||
|
- update.office_blind_button_firmware
|
||||||
|
- update.office_blind_left_firmware
|
||||||
|
- update.office_blind_right_firmware
|
||||||
|
- update.office_keylight_button_firmware
|
||||||
|
- update.office_window_sensor_firmware
|
||||||
|
- update.office_window_vibration_sensor_firmware
|
||||||
|
- update.osram_plug_01_firmware
|
||||||
|
- update.outside_sensor_firmware
|
||||||
|
- update.ozempic_sensor_firmware
|
||||||
|
- update.printer_button_firmware
|
||||||
|
- update.prusa_mini_button_firmware
|
||||||
|
- update.prusa_mini_outlet_firmware
|
||||||
|
- update.rack_laptop_outlet_firmware
|
||||||
|
- update.rack_outlet_firmware
|
||||||
|
- update.rack_smoke_sensor_firmware
|
||||||
|
- update.relay_switch_1x2_5kw_firmware
|
||||||
|
- update.samba_backup_update
|
||||||
|
- update.samba_share_update
|
||||||
|
- update.shower_1_firmware
|
||||||
|
- update.shower_2_firmware
|
||||||
|
- update.shower_3_firmware
|
||||||
|
- update.shower_4_firmware
|
||||||
|
- update.switch_poe_firmware
|
||||||
|
- update.table_lamp_1_firmware
|
||||||
|
- update.table_lamp_2_firmware
|
||||||
|
- update.table_lamp_3_firmware
|
||||||
|
- update.usb_rack_pwr_firmware
|
||||||
|
- update.usb_switch_1_firmware
|
||||||
|
- update.usb_switch_2_firmware
|
||||||
|
- update.usb_switch_3_firmware
|
||||||
|
- update.washing_machine_firmware
|
||||||
|
- update.washing_machine_leak_firmware
|
||||||
|
- update.wled_firmware
|
||||||
|
- update.wled_office_monitor_firmware
|
||||||
|
- update.z_wave_js_update
|
@ -20,7 +20,10 @@
|
|||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- switch.3d_printer
|
- switch.3d_printer
|
||||||
- switch.3d_printer_enclosure_fan_on_off
|
- service: fan.turn_off
|
||||||
|
target:
|
||||||
|
entity_id:
|
||||||
|
- fan.esp_3dprinter_controller_mk4_exhaust
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
entity_id: light.3d_printer_light
|
entity_id: light.3d_printer_light
|
||||||
|
|
||||||
@ -114,7 +117,10 @@
|
|||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- switch.3d_printer
|
- switch.3d_printer
|
||||||
- switch.3d_printer_enclosure_fan_on_off
|
- service: fan.turn_off
|
||||||
|
target:
|
||||||
|
entity_id:
|
||||||
|
- fan.esp_3dprinter_controller_mk4_exhaust
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
entity_id: light.3d_printer_light
|
entity_id: light.3d_printer_light
|
||||||
|
|
||||||
@ -136,9 +142,38 @@
|
|||||||
entity_id: sensor.prusa_mk39_material
|
entity_id: sensor.prusa_mk39_material
|
||||||
state: PETG
|
state: PETG
|
||||||
action:
|
action:
|
||||||
- service: switch.turn_on
|
- service: fan.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: switch.3d_printer_enclosure_fan_on_off
|
entity_id: fan.esp_3dprinter_controller_mk4_exhaust
|
||||||
|
|
||||||
|
- id: prusa_mk39_nevermore_on
|
||||||
|
alias: '[Prusa MK3.9] Nevermore on'
|
||||||
|
mode: single
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id:
|
||||||
|
- sensor.prusa_mk39
|
||||||
|
to: printing
|
||||||
|
condition:
|
||||||
|
- condition: or
|
||||||
|
conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: sensor.prusa_mk39_material
|
||||||
|
state: ABS
|
||||||
|
- condition: state
|
||||||
|
entity_id: sensor.prusa_mk39_material
|
||||||
|
state: ASA
|
||||||
|
- condition: state
|
||||||
|
entity_id: sensor.prusa_mk39_material
|
||||||
|
state: PC
|
||||||
|
- condition: state
|
||||||
|
entity_id: sensor.prusa_mk39_material
|
||||||
|
state: PCTG
|
||||||
|
action:
|
||||||
|
- service: fan.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: fan.esp_3dprinter_controller_mk4_nevermore
|
||||||
|
data:
|
||||||
|
|
||||||
- id: prusa_mk39_fan_off
|
- id: prusa_mk39_fan_off
|
||||||
alias: '[Prusa MK3.9] Fan off'
|
alias: '[Prusa MK3.9] Fan off'
|
||||||
@ -149,9 +184,9 @@
|
|||||||
from: printing
|
from: printing
|
||||||
to: idle
|
to: idle
|
||||||
action:
|
action:
|
||||||
- service: switch.turn_off
|
- service: fan.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: switch.3d_printer_enclosure_fan_on_off
|
entity_id: fan.esp_3dprinter_controller_mk4_exhaust
|
||||||
|
|
||||||
- id: prusa_mk39_pause_notify
|
- id: prusa_mk39_pause_notify
|
||||||
alias: '[Prusa MK3.9] Notify about paused print'
|
alias: '[Prusa MK3.9] Notify about paused print'
|
||||||
|
@ -115,6 +115,16 @@
|
|||||||
remote_src: no
|
remote_src: no
|
||||||
src: './build/automations/'
|
src: './build/automations/'
|
||||||
dest: '{{ pwd_config }}/automations.yaml'
|
dest: '{{ pwd_config }}/automations.yaml'
|
||||||
|
- name: Include availability vars
|
||||||
|
include_vars:
|
||||||
|
file: availability.yml
|
||||||
|
- name: Build unavailable script
|
||||||
|
delegate_to: localhost
|
||||||
|
template:
|
||||||
|
src: check-unavailable.yaml.j2
|
||||||
|
dest: './scripts/check-unavailable.yaml'
|
||||||
|
vars:
|
||||||
|
entities: "{{ availability }}"
|
||||||
- name: Concat scripts
|
- name: Concat scripts
|
||||||
ansible.builtin.assemble:
|
ansible.builtin.assemble:
|
||||||
remote_src: no
|
remote_src: no
|
||||||
|
@ -12,10 +12,10 @@ good_night:
|
|||||||
data:
|
data:
|
||||||
option: Night
|
option: Night
|
||||||
entity_id: input_select.home_mode
|
entity_id: input_select.home_mode
|
||||||
- service: script.bedroom_lights_off
|
|
||||||
- service: script.cctv_on
|
- service: script.cctv_on
|
||||||
- service: alarm_control_panel.alarm_arm_home
|
- service: alarm_control_panel.alarm_arm_home
|
||||||
entity_id: alarm_control_panel.home_alarm
|
entity_id: alarm_control_panel.home_alarm
|
||||||
|
- service: script.bedroom_lights_off
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
@ -105,6 +105,12 @@ good_morning:
|
|||||||
mode: single
|
mode: single
|
||||||
icon: mdi:weather-sunny
|
icon: mdi:weather-sunny
|
||||||
sequence:
|
sequence:
|
||||||
|
- service: alarm_control_panel.alarm_disarm
|
||||||
|
entity_id: alarm_control_panel.home_alarm
|
||||||
|
- service: input_select.select_option
|
||||||
|
data:
|
||||||
|
option: Day
|
||||||
|
entity_id: input_select.home_mode
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.meal_alert
|
entity_id: input_boolean.meal_alert
|
||||||
@ -117,12 +123,6 @@ good_morning:
|
|||||||
- cover.bedroom_blinds
|
- cover.bedroom_blinds
|
||||||
- cover.dining_blinds
|
- cover.dining_blinds
|
||||||
- cover.office_blinds
|
- cover.office_blinds
|
||||||
- service: alarm_control_panel.alarm_disarm
|
|
||||||
entity_id: alarm_control_panel.home_alarm
|
|
||||||
- service: input_select.select_option
|
|
||||||
data:
|
|
||||||
option: Day
|
|
||||||
entity_id: input_select.home_mode
|
|
||||||
- service: switch.turn_on
|
- service: switch.turn_on
|
||||||
entity_id:
|
entity_id:
|
||||||
- switch.computer_outlet
|
- switch.computer_outlet
|
||||||
@ -167,13 +167,13 @@ leave_home:
|
|||||||
mode: single
|
mode: single
|
||||||
icon: mdi:home-export-outline
|
icon: mdi:home-export-outline
|
||||||
sequence:
|
sequence:
|
||||||
- service: script.cctv_on
|
|
||||||
- service: alarm_control_panel.alarm_arm_away
|
- service: alarm_control_panel.alarm_arm_away
|
||||||
entity_id: alarm_control_panel.home_alarm
|
entity_id: alarm_control_panel.home_alarm
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
data:
|
data:
|
||||||
option: Away
|
option: Away
|
||||||
entity_id: input_select.home_mode
|
entity_id: input_select.home_mode
|
||||||
|
- service: script.cctv_on
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
@ -245,13 +245,13 @@ arrive_home:
|
|||||||
mode: single
|
mode: single
|
||||||
icon: mdi:home-import-outline
|
icon: mdi:home-import-outline
|
||||||
sequence:
|
sequence:
|
||||||
- service: script.cctv_off
|
|
||||||
- service: alarm_control_panel.alarm_disarm
|
- service: alarm_control_panel.alarm_disarm
|
||||||
entity_id: alarm_control_panel.home_alarm
|
entity_id: alarm_control_panel.home_alarm
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
data:
|
data:
|
||||||
option: Day
|
option: Day
|
||||||
entity_id: input_select.home_mode
|
entity_id: input_select.home_mode
|
||||||
|
- service: script.cctv_off
|
||||||
- service: switch.turn_on
|
- service: switch.turn_on
|
||||||
entity_id:
|
entity_id:
|
||||||
- switch.computer_outlet
|
- switch.computer_outlet
|
||||||
|
17
templates/check-unavailable.yaml.j2
Normal file
17
templates/check-unavailable.yaml.j2
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
check_unavailable:
|
||||||
|
alias: '[INFO] Check unavailable devices'
|
||||||
|
sequence:
|
||||||
|
{% for entity in entities %}
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: {{ entity }}
|
||||||
|
state: unavailable
|
||||||
|
sequence:
|
||||||
|
- service: notify.home_assistant
|
||||||
|
data:
|
||||||
|
message: >
|
||||||
|
Device unavailable
|
||||||
|
{% raw %}{{ {% endraw %} device_attr('{{entity}}', 'name_by_user'){% raw %} }} {% endraw %}is unavailable
|
||||||
|
target: [ "1109936159951441960" ]
|
||||||
|
{% endfor %}
|
@ -28,4 +28,4 @@
|
|||||||
message: >
|
message: >
|
||||||
Low battery
|
Low battery
|
||||||
{% raw %}{{ device_attr(trigger.entity_id, 'name_by_user') }} has low battery {{ states(trigger.entity_id) }}% {% endraw %}
|
{% raw %}{{ device_attr(trigger.entity_id, 'name_by_user') }} has low battery {{ states(trigger.entity_id) }}% {% endraw %}
|
||||||
target: [ "1070507369164984372" ]
|
target: [ "1109936159951441960" ]
|
||||||
|
@ -16,4 +16,4 @@
|
|||||||
message: >
|
message: >
|
||||||
Device unavailable
|
Device unavailable
|
||||||
{% raw %}{{ device_attr(trigger.event.data.device_id, 'name_by_user') }}{% endraw %} is unavailable
|
{% raw %}{{ device_attr(trigger.event.data.device_id, 'name_by_user') }}{% endraw %} is unavailable
|
||||||
target: [ "1070507369164984372" ]
|
target: [ "1109936159951441960" ]
|
||||||
|
@ -14,4 +14,4 @@
|
|||||||
message: >
|
message: >
|
||||||
Device unavailable
|
Device unavailable
|
||||||
{% raw %}{{ device_attr(device_id(trigger.event.data.device_id), 'name_by_user') }}{% endraw %} is unavailable
|
{% raw %}{{ device_attr(device_id(trigger.event.data.device_id), 'name_by_user') }}{% endraw %} is unavailable
|
||||||
target: [ "1070507369164984372" ]
|
target: [ "1109936159951441960" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user