From 08bcbae544403cece0f416738027c32cefd1ee98 Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Tue, 18 Feb 2025 16:56:06 +0000 Subject: [PATCH] Closes #1115 - Printer Announcements --- config/.HA_VERSION | 2 +- config/packages/printer.yaml | 55 ++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100755 config/packages/printer.yaml diff --git a/config/.HA_VERSION b/config/.HA_VERSION index 2055d5d0..7b61a1bc 100755 --- a/config/.HA_VERSION +++ b/config/.HA_VERSION @@ -1 +1 @@ -2025.2.1 \ No newline at end of file +2025.2.4 \ No newline at end of file diff --git a/config/packages/printer.yaml b/config/packages/printer.yaml new file mode 100755 index 00000000..69844549 --- /dev/null +++ b/config/packages/printer.yaml @@ -0,0 +1,55 @@ +#------------------------------------------- +# @CCOSTAN +# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig +# inspired by https://community.home-assistant.io/t/epson-wf-3540-ink-level-monitoring/21813 +#------------------------------------------- + +############################################################################## +### Automations - Detect when things are not right. Like any Good Watchdog. +############################################################################## + +automation: + - alias: 'Printer Ink Alert' + id: 6ef2a695-0b76-4eb5-b67c-2ff6f74f40b8 + initial_state: 'on' + trigger: + - platform: numeric_state + entity_id: + - sensor.canon_ts300_series_black + - sensor.canon_ts300_series_color + below: 15 + condition: + condition: time + weekday: + - wed + action: + - service: script.notify_engine + data: + value1: "{{ trigger.to_state.attributes.friendly_name }} is at {{ trigger.to_state.state }} " + who: 'carlo' + apns_id: 'information' + + - alias: 'Printer Status Notifications' + id: 6ef2a695-0b76-4eb5-b67c-2ff6f74f40b9 + trigger: + - platform: state + entity_id: sensor.canon_ts300_series + from: 'unavailable' + to: 'idle' + - platform: state + entity_id: sensor.canon_ts300_series + to: 'printing' + action: + - service: notify.alexa_media_front_room_flex + data: + message: > + {% if trigger.to_state.state == 'idle' %} + Printer has powered on and is ready + {% else %} + Printer is now printing + {% endif %} + data: + type: announce + + +#-------------------------------------------