diff --git a/battery.yml b/battery.yml index 5497e90..04b3760 100644 --- a/battery.yml +++ b/battery.yml @@ -67,6 +67,7 @@ battery: - sensor.office_window_vibration_sensor_battery - sensor.ozempic_sensor_battery - sensor.printer_button_battery + - sensor.prusa_mini_button_battery - sensor.quest_battery_level - sensor.rack_sensor_battery - sensor.rack_smoke_sensor_battery diff --git a/configuration/automations/3d-printer-mini.yaml b/configuration/automations/3d-printer-mini.yaml index c592eda..87c5631 100644 --- a/configuration/automations/3d-printer-mini.yaml +++ b/configuration/automations/3d-printer-mini.yaml @@ -1,3 +1,38 @@ +- id: prusa_mini_button + alias: '[Prusa MINI] button' + mode: single + trigger: + - device_id: e233cdffb05076ad7bb049581ffa8c9c + domain: zha + platform: device + type: remote_button_short_press + subtype: remote_button_short_press + action: + - choose: + - conditions: + - condition: state + entity_id: switch.prusa_mini_switch + state: 'off' + sequence: + - service: switch.turn_on + target: + entity_id: switch.prusa_mini_switch + - conditions: + - condition: state + entity_id: switch.prusa_mini_switch + state: 'on' + - condition: state + entity_id: sensor.prusa_mini + state: idle + - condition: numeric_state + entity_id: sensor.prusa_mini_outlet_power + below: '10' + sequence: + - service: switch.turn_off + target: + entity_id: + - switch.prusa_mini_switch + - id: prusa_mini_door_open alias: '[Prusa Mini] Door open' mode: single diff --git a/zha-devices.yml b/zha-devices.yml index ca52d78..9b912a3 100644 --- a/zha-devices.yml +++ b/zha-devices.yml @@ -181,5 +181,7 @@ devices: id: '2963910c6c3798aab228abe14ed46ba8' - name: 'Bathroom music button' id: 'ea9059ad2df037a012ab01a575108dc5' - - name: 'Prusa MINI' + - name: 'Prusa MINI outlet' id: '1a9044fa5e6d0ed3870b8b99c5ee9bd1' + - name: 'Prusa MINI button' + id: 'e233cdffb05076ad7bb049581ffa8c9c'