various packages
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
# PACKAGE: Appliance Monitor Processor
|
||||
################################################################################
|
||||
#
|
||||
# Version: 1.2
|
||||
# Date: 2026-06-09
|
||||
# Version: 1.3
|
||||
# Date: 2026-07-11
|
||||
#
|
||||
# Purpose:
|
||||
# Shared appliance power monitoring processor.
|
||||
@@ -20,6 +20,7 @@
|
||||
# - One MQTT sensor per appliance.
|
||||
# - Timestamp-based energy and cost calculation.
|
||||
# - Rolling average state detection.
|
||||
# - Completion announcements through script.view_road_announcement.
|
||||
#
|
||||
# Default values:
|
||||
# debug_flow: false
|
||||
@@ -40,6 +41,16 @@
|
||||
# Finished
|
||||
#
|
||||
# Notes:
|
||||
# Version 1.3:
|
||||
# - Updated completion announcements to support all current View Road
|
||||
# announcement router channels.
|
||||
# - Added pushover_kim to the default appliance completion channels.
|
||||
# - Added mqtt_view_rd_feed support by passing mqtt_feed to the announcement
|
||||
# router.
|
||||
# - Added led_matrix_2 support.
|
||||
# - Added optional announcement_enabled and announcement_payload fields.
|
||||
# - Kept existing field names for backwards compatibility.
|
||||
#
|
||||
# Version 1.2:
|
||||
# - Added min_cycle_notify_seconds.
|
||||
# - Finished cycles shorter than this are still recorded, but do not send
|
||||
@@ -53,17 +64,39 @@
|
||||
#
|
||||
################################################################################
|
||||
# FINISHED ANNOUNCEMENT
|
||||
# The finishing script calls the package view_road_announcement_router.yaml.
|
||||
# If you want to use your own announcement system, it will occur at the end
|
||||
# at am_cycle_notify_allowed being true, so change to your own announcement
|
||||
# method there.
|
||||
################################################################################
|
||||
#
|
||||
# The finishing script calls:
|
||||
#
|
||||
# script.view_road_announcement
|
||||
#
|
||||
# Current View Road announcement router channels:
|
||||
# pushover_zorruno
|
||||
# pushover_kim
|
||||
# sony_tv_lounge
|
||||
# lounge_google_home_voice
|
||||
# google_home_voice
|
||||
# lounge_touchscreen_voice
|
||||
# mqtt_view_rd_feed
|
||||
# led_matrix_1
|
||||
# led_matrix_2
|
||||
#
|
||||
# Notes:
|
||||
# - google_home_voice is an alias for lounge_google_home_voice.
|
||||
# - lounge_touchscreen_voice is currently a placeholder route in the router.
|
||||
# - mqtt_view_rd_feed requires mqtt_feed to be populated.
|
||||
# - led_matrix_1 and led_matrix_2 use short_announcement and indicator.
|
||||
#
|
||||
# Announcements can use:
|
||||
# am_announcement_channels
|
||||
# am_announcement_title
|
||||
# am_short_announcement
|
||||
# am_long_announcement
|
||||
# am_matrix_indicator
|
||||
# announcement_enabled
|
||||
# announcement_channels
|
||||
# title
|
||||
# short_announcement
|
||||
# long_announcement
|
||||
# announcement_payload
|
||||
# payload
|
||||
# matrix_indicator
|
||||
# mqtt_feed
|
||||
#
|
||||
################################################################################
|
||||
|
||||
@@ -127,6 +160,59 @@ script:
|
||||
step: 1
|
||||
unit_of_measurement: s
|
||||
|
||||
announcement_enabled:
|
||||
name: Announcement Enabled
|
||||
description: Whether a valid finished cycle should send an announcement.
|
||||
default: true
|
||||
selector:
|
||||
boolean:
|
||||
|
||||
announcement_channels:
|
||||
name: Announcement Channels
|
||||
description: Comma-separated View Road announcement router channels.
|
||||
default: "pushover_zorruno, pushover_kim, sony_tv_lounge, lounge_google_home_voice, mqtt_view_rd_feed, led_matrix_1"
|
||||
selector:
|
||||
text:
|
||||
|
||||
title:
|
||||
name: Announcement Title
|
||||
description: Announcement title passed to the View Road announcement router.
|
||||
selector:
|
||||
text:
|
||||
|
||||
short_announcement:
|
||||
name: Short Announcement
|
||||
description: Short announcement text for TV, voice and LED matrix.
|
||||
selector:
|
||||
text:
|
||||
|
||||
long_announcement:
|
||||
name: Long Announcement
|
||||
description: Long announcement text for Pushover and detailed channels.
|
||||
selector:
|
||||
text:
|
||||
multiline: true
|
||||
|
||||
announcement_payload:
|
||||
name: Announcement Payload
|
||||
description: Optional payload passed to the announcement router.
|
||||
selector:
|
||||
text:
|
||||
|
||||
matrix_indicator:
|
||||
name: Matrix Indicator
|
||||
description: LED matrix indicator data.
|
||||
example: "wash,1,15,10,6,5,1,0"
|
||||
selector:
|
||||
text:
|
||||
|
||||
mqtt_feed:
|
||||
name: MQTT Activity Feed
|
||||
description: Activity feed topic suffix used by mqtt_view_rd_feed.
|
||||
example: "washing_machine"
|
||||
selector:
|
||||
text:
|
||||
|
||||
sequence:
|
||||
##########################################################################
|
||||
# CORE DEFAULTS AND PASSED VALUES
|
||||
@@ -156,10 +242,36 @@ script:
|
||||
##########################################################################
|
||||
# ANNOUNCEMENT DEFAULTS AND PASSED VALUES
|
||||
##########################################################################
|
||||
#
|
||||
# These values are passed to script.view_road_announcement when an
|
||||
# appliance cycle successfully finishes.
|
||||
#
|
||||
# Current supported router channels:
|
||||
# pushover_zorruno
|
||||
# pushover_kim
|
||||
# sony_tv_lounge
|
||||
# lounge_google_home_voice
|
||||
# google_home_voice
|
||||
# lounge_touchscreen_voice
|
||||
# mqtt_view_rd_feed
|
||||
# led_matrix_1
|
||||
# led_matrix_2
|
||||
#
|
||||
# Notes:
|
||||
# - google_home_voice is an alias for lounge_google_home_voice.
|
||||
# - lounge_touchscreen_voice is currently a placeholder route.
|
||||
# - mqtt_view_rd_feed requires mqtt_feed to be populated.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
- variables:
|
||||
am_announcement_enabled: "{{ announcement_enabled | default(true, true) | bool(true) }}"
|
||||
|
||||
am_default_announcement_channels: >-
|
||||
pushover_zorruno, pushover_kim, sony_tv_lounge, lounge_google_home_voice, mqtt_view_rd_feed, led_matrix_1
|
||||
|
||||
am_announcement_channels: >-
|
||||
{{ announcement_channels | default('pushover_zorruno, sony_tv_lounge, lounge_google_home_voice, led_matrix_1', true) | string }}
|
||||
{{ announcement_channels | default(am_default_announcement_channels, true) | string }}
|
||||
|
||||
am_short_announcement: >-
|
||||
{{ short_announcement | default((am_appliance_action | title) ~ ' complete', true) | string }}
|
||||
@@ -170,7 +282,20 @@ script:
|
||||
am_announcement_title: >-
|
||||
{{ title | default(am_appliance_name ~ ' Notification', true) | string }}
|
||||
|
||||
am_matrix_indicator: "{{ matrix_indicator | default('', true) | string }}"
|
||||
am_announcement_payload: >-
|
||||
{% if announcement_payload is defined %}
|
||||
{{ announcement_payload }}
|
||||
{% elif payload is defined %}
|
||||
{{ payload }}
|
||||
{% else %}
|
||||
{{ '' }}
|
||||
{% endif %}
|
||||
|
||||
am_matrix_indicator: >-
|
||||
{{ matrix_indicator | default('', true) | string }}
|
||||
|
||||
am_mqtt_feed: >-
|
||||
{{ mqtt_feed | default(am_appliance_id, true) | string }}
|
||||
|
||||
##########################################################################
|
||||
# PREVIOUS STATE FROM MQTT MONITOR SENSOR ATTRIBUTES
|
||||
@@ -622,6 +747,12 @@ script:
|
||||
and (am_cycle_duration_seconds_new | int(0)) >= (am_min_cycle_notify_seconds | int(300))
|
||||
}}
|
||||
|
||||
am_cycle_announcement_allowed: >-
|
||||
{{
|
||||
am_cycle_notify_allowed | bool(false)
|
||||
and am_announcement_enabled | bool(true)
|
||||
}}
|
||||
|
||||
am_cycle_notification_suppressed: >-
|
||||
{{
|
||||
am_cycle_finished | bool(false)
|
||||
@@ -631,6 +762,8 @@ script:
|
||||
am_cycle_notification_suppressed_reason: >-
|
||||
{% if am_cycle_notification_suppressed | bool(false) %}
|
||||
Cycle was shorter than {{ am_min_cycle_notify_seconds | int(300) }} seconds
|
||||
{% elif am_cycle_notify_allowed | bool(false) and not (am_announcement_enabled | bool(true)) %}
|
||||
Announcement disabled for this appliance
|
||||
{% endif %}
|
||||
|
||||
##########################################################################
|
||||
@@ -673,6 +806,10 @@ script:
|
||||
|
||||
min_cycle_notify_seconds=am_min_cycle_notify_seconds | int(300),
|
||||
cycle_notify_allowed=am_cycle_notify_allowed | bool(false),
|
||||
cycle_announcement_allowed=am_cycle_announcement_allowed | bool(false),
|
||||
announcement_enabled=am_announcement_enabled | bool(true),
|
||||
announcement_channels=am_announcement_channels,
|
||||
mqtt_feed=am_mqtt_feed,
|
||||
cycle_notification_suppressed=am_cycle_notification_suppressed | bool(false),
|
||||
cycle_notification_suppressed_reason=am_cycle_notification_suppressed_reason | trim,
|
||||
|
||||
@@ -740,18 +877,45 @@ script:
|
||||
threshold. No announcement was sent.
|
||||
|
||||
##########################################################################
|
||||
# FINISHED ANNOUNCEMENT
|
||||
##########################################################################
|
||||
# This script is in additional package view_road_announcement_router.yaml.
|
||||
# If you want to use your own announcement system, it will occur here
|
||||
# at am_cycle_notify_allowed being true.
|
||||
#
|
||||
# Change to your own announcement method here if needed.
|
||||
# ANNOUNCEMENT DISABLED LOG
|
||||
##########################################################################
|
||||
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ am_cycle_notify_allowed | bool(false) }}"
|
||||
value_template: >-
|
||||
{{
|
||||
am_cycle_notify_allowed | bool(false)
|
||||
and not (am_announcement_enabled | bool(true))
|
||||
}}
|
||||
then:
|
||||
- action: logbook.log
|
||||
data:
|
||||
name: "Appliance Monitor"
|
||||
message: >-
|
||||
{{ am_appliance_name }} finished after
|
||||
{{ am_cycle_duration_formatted | trim }}, but appliance
|
||||
completion announcements are disabled for this appliance.
|
||||
|
||||
##########################################################################
|
||||
# FINISHED ANNOUNCEMENT
|
||||
##########################################################################
|
||||
# This calls script.view_road_announcement from the announcement router
|
||||
# package when a valid appliance cycle finishes.
|
||||
#
|
||||
# All supported router channels can be used through am_announcement_channels.
|
||||
#
|
||||
# mqtt_view_rd_feed requires:
|
||||
# mqtt_feed
|
||||
#
|
||||
# led_matrix_1 and led_matrix_2 require:
|
||||
# short_announcement
|
||||
# indicator
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ am_cycle_announcement_allowed | bool(false) }}"
|
||||
then:
|
||||
- action: script.view_road_announcement
|
||||
data:
|
||||
@@ -759,5 +923,6 @@ script:
|
||||
title: "{{ am_announcement_title }}"
|
||||
short_announcement: "{{ am_short_announcement }}"
|
||||
long_announcement: "{{ am_long_announcement }}"
|
||||
payload: ""
|
||||
payload: "{{ am_announcement_payload }}"
|
||||
indicator: "{{ am_matrix_indicator }}"
|
||||
mqtt_feed: "{{ am_mqtt_feed }}"
|
||||
|
||||
@@ -1,49 +1,85 @@
|
||||
################################################################################
|
||||
# PACKAGE: Appliances Status Monitoring
|
||||
################################################################################
|
||||
#:########################################################################################:#
|
||||
# Appliances Status Monitoring Package #
|
||||
#:########################################################################################:#
|
||||
#
|
||||
# Version: 1.4
|
||||
# Date: 2026-06-09
|
||||
# FILE:
|
||||
# appliances_status_monitoring.yaml
|
||||
#
|
||||
# Purpose:
|
||||
# VERSION:
|
||||
# V1.5 2026-07-11
|
||||
#
|
||||
# PURPOSE:
|
||||
# Appliance status monitoring package for multiple appliances.
|
||||
#
|
||||
# This package defines a central appliance registry and one automation that:
|
||||
#
|
||||
# 1. Publishes MQTT discovery config for each appliance monitor sensor.
|
||||
# 1. Publishes MQTT Discovery configuration for each appliance monitor
|
||||
# sensor.
|
||||
# 2. Samples appliance power sensors once per minute.
|
||||
# 3. Calls script.appliance_monitor_process_sample.
|
||||
# 4. Passes per-appliance completion announcement settings to the processor.
|
||||
#
|
||||
# Processor package required:
|
||||
# appliance_monitor_processor.yaml
|
||||
#
|
||||
# Announcement router required:
|
||||
# view_road_announcement_router.yaml
|
||||
# REQUIRED PACKAGES:
|
||||
# appliance_monitor_processor.yaml V1.3 or newer
|
||||
# view_road_announcement_router.yaml V1.8 or newer
|
||||
#
|
||||
# MQTT:
|
||||
# MQTT is used only as retained state storage for appliance monitor sensors.
|
||||
# Sensor entities are created using MQTT discovery.
|
||||
# MQTT is used as retained state storage for appliance monitor sensors.
|
||||
# Sensor entities are created using MQTT Discovery.
|
||||
#
|
||||
# Adding another appliance:
|
||||
# Add one entry to the am_appliances list.
|
||||
# ADDING AN APPLIANCE:
|
||||
# Add one entry to the am_appliances registry below.
|
||||
#
|
||||
# Version 1.4:
|
||||
# Added min_cycle_notify_seconds support.
|
||||
# Default is 300 seconds, so cycles shorter than 5 minutes are recorded but
|
||||
# do not send finished notifications.
|
||||
# Per-appliance overrides can be set in the am_appliances list.
|
||||
# ANNOUNCEMENT ROUTER CHANNELS:
|
||||
# The following channel IDs are accepted by the current announcement router:
|
||||
#
|
||||
# Version 1.3:
|
||||
# Removed the is_number gate before calling the processor. The processor is
|
||||
# now always called once per appliance per sample, and power is safely converted
|
||||
# to 0 if the source sensor is unavailable or non-numeric.
|
||||
# pushover_zorruno
|
||||
# pushover_kim
|
||||
# sony_tv_lounge
|
||||
# lounge_google_home_voice
|
||||
# google_home_voice
|
||||
# lounge_touchscreen_voice
|
||||
# mqtt_view_rd_feed
|
||||
# led_matrix_1
|
||||
# led_matrix_2
|
||||
#
|
||||
################################################################################
|
||||
# Notes:
|
||||
# - google_home_voice is an alias for lounge_google_home_voice.
|
||||
# - lounge_touchscreen_voice is currently a placeholder route.
|
||||
# - mqtt_view_rd_feed requires mqtt_feed.
|
||||
# - led_matrix_1 and led_matrix_2 use short_announcement and
|
||||
# matrix_indicator.
|
||||
#
|
||||
# VERSION HISTORY:
|
||||
# V1.5 2026-07-11
|
||||
# - Added full View Road announcement router parameter support.
|
||||
# - Added per-appliance announcement_enabled.
|
||||
# - Added per-appliance announcement_payload.
|
||||
# - Added per-appliance mqtt_feed for mqtt_view_rd_feed.
|
||||
# - Added safe defaults for short announcement and matrix indicator.
|
||||
# - Documented all current announcement router channel names.
|
||||
# - Existing per-appliance channel selections retained unchanged.
|
||||
#
|
||||
# V1.4 2026-06-09
|
||||
# - Added min_cycle_notify_seconds support.
|
||||
# - Default is 300 seconds, so cycles shorter than 5 minutes are recorded
|
||||
# but do not send finished notifications.
|
||||
# - Per-appliance overrides can be set in the am_appliances list.
|
||||
#
|
||||
# V1.3:
|
||||
# - Removed the is_number gate before calling the processor.
|
||||
# - The processor is always called once per appliance per sample.
|
||||
# - Power is safely converted to 0 if unavailable or non-numeric.
|
||||
#
|
||||
#:########################################################################################:#
|
||||
|
||||
automation:
|
||||
- id: appliances_status_monitoring_process_samples
|
||||
alias: Appliances Status Monitoring - Process Samples
|
||||
description: Publish MQTT discovery, sample appliance power sensors, and process appliance status/cycle data.
|
||||
alias: "Appliances Status Monitoring - Process Samples"
|
||||
description: >-
|
||||
Publishes MQTT Discovery, samples appliance power sensors, processes
|
||||
appliance status and cycle data, and passes completion announcement
|
||||
settings to the shared processor.
|
||||
mode: queued
|
||||
max: 20
|
||||
|
||||
@@ -57,17 +93,17 @@ automation:
|
||||
id: periodic_sample
|
||||
|
||||
variables:
|
||||
##########################################################################
|
||||
# MQTT LOCAL CONTROLS
|
||||
##########################################################################
|
||||
#:####################################################################################:#
|
||||
# MQTT LOCAL CONTROLS #
|
||||
#:####################################################################################:#
|
||||
|
||||
mqtt_device_name: "appliance_monitor"
|
||||
mqtt_local_status_topic: !secret mqtt_status_main_topic
|
||||
mqtt_discovery_prefix: "homeassistant"
|
||||
|
||||
##########################################################################
|
||||
# DEFAULTS
|
||||
##########################################################################
|
||||
#:####################################################################################:#
|
||||
# PROCESSOR DEFAULTS #
|
||||
#:####################################################################################:#
|
||||
|
||||
am_default_debug_flow: false
|
||||
am_default_resolution: 2
|
||||
@@ -75,91 +111,184 @@ automation:
|
||||
am_default_operating_power_min: 12
|
||||
am_default_min_cycle_notify_seconds: 300
|
||||
|
||||
#am_default_announcement_channels: "pushover_zorruno, sony_tv_lounge, lounge_google_home_voice, led_matrix_1"
|
||||
#:####################################################################################:#
|
||||
# ANNOUNCEMENT DEFAULTS #
|
||||
#:####################################################################################:#
|
||||
#
|
||||
# These defaults apply when an appliance does not define its own values.
|
||||
#
|
||||
# A conservative default channel is retained to prevent additional
|
||||
# notifications suddenly being enabled for every appliance.
|
||||
#
|
||||
# To make all implemented channels the default, this could instead be:
|
||||
#
|
||||
# am_default_announcement_channels: >-
|
||||
# pushover_zorruno,pushover_kim,sony_tv_lounge,
|
||||
# lounge_google_home_voice,mqtt_view_rd_feed,
|
||||
# led_matrix_1,led_matrix_2
|
||||
#
|
||||
# Available channels:
|
||||
# pushover_zorruno
|
||||
# pushover_kim
|
||||
# sony_tv_lounge
|
||||
# lounge_google_home_voice
|
||||
# google_home_voice
|
||||
# lounge_touchscreen_voice
|
||||
# mqtt_view_rd_feed
|
||||
# led_matrix_1
|
||||
# led_matrix_2
|
||||
|
||||
am_default_announcement_enabled: true
|
||||
am_default_announcement_channels: "pushover_zorruno"
|
||||
am_default_announcement_payload: ""
|
||||
|
||||
# Optional appliance-specific overrides available:
|
||||
# resolution: 4
|
||||
# The number of samples for the average, with one sample per minute.
|
||||
#:####################################################################################:#
|
||||
# OPTIONAL PER-APPLIANCE OVERRIDES #
|
||||
#:####################################################################################:#
|
||||
#
|
||||
# standby_power: 3
|
||||
# Below this value, the appliance will show "Off".
|
||||
# Between this value and operating_power_min, it will show "Standby".
|
||||
# debug_flow: true
|
||||
# Writes state-processing details to the Home Assistant logbook.
|
||||
#
|
||||
# operating_power_min: 20
|
||||
# The minimum average power needed for the appliance to show "Operating".
|
||||
# resolution: 4
|
||||
# Number of one-minute samples used for the rolling average.
|
||||
#
|
||||
# min_cycle_notify_seconds: 600
|
||||
# Finished cycles shorter than this are recorded, but no notification
|
||||
# is sent. Default is 300 seconds.
|
||||
# standby_power: 3
|
||||
# Below this value, the appliance shows Off.
|
||||
# Between standby_power and operating_power_min, it shows Standby.
|
||||
#
|
||||
# announcement_channels: "pushover_zorruno"
|
||||
# Announcement channels for this appliance.
|
||||
# operating_power_min: 20
|
||||
# Minimum rolling-average power required for Operating.
|
||||
#
|
||||
# long_announcement: "The device has finished. Please empty it when convenient."
|
||||
# Override the long announcement.
|
||||
# min_cycle_notify_seconds: 600
|
||||
# Minimum cycle duration before a completion announcement is allowed.
|
||||
#
|
||||
# min_cycle_notify_seconds: 600
|
||||
# Minimum time for an appliance to be operating before a completion announcement generated.
|
||||
# announcement_enabled: false
|
||||
# Disables cycle-completion announcements for this appliance.
|
||||
#
|
||||
# announcement_channels: >-
|
||||
# pushover_zorruno,pushover_kim,sony_tv_lounge,
|
||||
# lounge_google_home_voice,mqtt_view_rd_feed,
|
||||
# led_matrix_1,led_matrix_2
|
||||
# Comma-separated View Road announcement router channels.
|
||||
#
|
||||
# title: "Washing Machine Notification"
|
||||
# Optional announcement title.
|
||||
#
|
||||
# short_announcement: "Washing complete"
|
||||
# Used by TV, voice and LED matrix channels.
|
||||
#
|
||||
# long_announcement: "The washing machine has finished."
|
||||
# Used by Pushover and other detailed channels.
|
||||
# If omitted, the processor creates a detailed cycle summary.
|
||||
#
|
||||
# announcement_payload: ""
|
||||
# Optional payload passed to the announcement router.
|
||||
#
|
||||
# matrix_indicator: "wash,1,15,10,6,5,1,0"
|
||||
# LED matrix indicator data.
|
||||
#
|
||||
# mqtt_feed: "washing_machine"
|
||||
# Activity-feed suffix used by mqtt_view_rd_feed.
|
||||
# If omitted, appliance_id is used.
|
||||
#
|
||||
#:####################################################################################:#
|
||||
|
||||
##########################################################################
|
||||
# APPLIANCE REGISTRY
|
||||
##########################################################################
|
||||
#:####################################################################################:#
|
||||
# APPLIANCE REGISTRY #
|
||||
#:####################################################################################:#
|
||||
|
||||
am_appliances:
|
||||
#:##################################################################################:#
|
||||
# Washing Machine #
|
||||
#:##################################################################################:#
|
||||
|
||||
- appliance_id: washing_machine
|
||||
appliance_name: "Washing Machine"
|
||||
appliance_action: "washing"
|
||||
power_entity: "sensor.esp_laundrywashpow_load_power"
|
||||
icon: "mdi:washing-machine"
|
||||
short_announcement: "/s/sWashing complete"
|
||||
# long_announcement: # Created by the processor
|
||||
matrix_indicator: "wash,1,15,10,6,5,1,0"
|
||||
# Optional washing-machine-specific overrides
|
||||
|
||||
resolution: 5
|
||||
standby_power: 3
|
||||
operating_power_min: 10
|
||||
announcement_channels: "pushover_zorruno"
|
||||
|
||||
announcement_enabled: true
|
||||
announcement_channels: "pushover_zorruno,pushover_kim,sony_tv_lounge,led_matrix_1"
|
||||
short_announcement: "/s/sWashing complete"
|
||||
# long_announcement: # Generated by the processor
|
||||
announcement_payload: ""
|
||||
matrix_indicator: "wash,1,15,10,6,5,1,0"
|
||||
mqtt_feed: "Washer_complete"
|
||||
|
||||
#:##################################################################################:#
|
||||
# Dryer #
|
||||
#:##################################################################################:#
|
||||
|
||||
- appliance_id: dryer
|
||||
appliance_name: "Dryer"
|
||||
appliance_action: "drying"
|
||||
power_entity: "sensor.esp_laundrydrypow_load_power"
|
||||
icon: "mdi:tumble-dryer"
|
||||
short_announcement: "/s/sDryer complete"
|
||||
# long_announcement: # Created by the processor
|
||||
matrix_indicator: "dry,1,15,10,6,5,1,0"
|
||||
# Optional dryer-specific overrides
|
||||
|
||||
resolution: 4
|
||||
standby_power: 3
|
||||
operating_power_min: 10
|
||||
announcement_channels: "pushover_zorruno"
|
||||
|
||||
announcement_enabled: true
|
||||
announcement_channels: "pushover_zorruno,pushover_kim,sony_tv_lounge,led_matrix_1"
|
||||
short_announcement: "/s/sDryer complete"
|
||||
# long_announcement: # Generated by the processor
|
||||
announcement_payload: ""
|
||||
matrix_indicator: "dry,1,15,10,6,5,1,0"
|
||||
mqtt_feed: "Dryer_complete"
|
||||
|
||||
#:##################################################################################:#
|
||||
# Main Dishwasher #
|
||||
#:##################################################################################:#
|
||||
|
||||
- appliance_id: main_dishwasher
|
||||
appliance_name: "Main Dishwasher"
|
||||
appliance_action: "dishwashing"
|
||||
power_entity: "sensor.esp_maindishwasherpower_power"
|
||||
icon: "mdi:dishwasher"
|
||||
short_announcement: "/sDishwasher complete"
|
||||
# long_announcement: # Created by the processor
|
||||
matrix_indicator: "dish,1,15,10,6,5,1,0"
|
||||
|
||||
resolution: 5
|
||||
standby_power: 3
|
||||
operating_power_min: 30
|
||||
announcement_channels: "pushover_zorruno"
|
||||
|
||||
announcement_enabled: true
|
||||
announcement_channels: "pushover_zorruno,pushover_kim,sony_tv_lounge,led_matrix_1"
|
||||
short_announcement: "/sDishwasher complete"
|
||||
# long_announcement: # Generated by the processor
|
||||
announcement_payload: ""
|
||||
matrix_indicator: "dish,1,15,10,6,5,1,0"
|
||||
mqtt_feed: "Dishwasher_complete"
|
||||
|
||||
#:##################################################################################:#
|
||||
# Downstairs Dishwasher #
|
||||
#:##################################################################################:#
|
||||
|
||||
- appliance_id: downstairs_dishwasher
|
||||
appliance_name: "Downstairs Dishwasher"
|
||||
appliance_action: "dishwashing"
|
||||
power_entity: "sensor.esp_downstdishwasher_power"
|
||||
icon: "mdi:dishwasher"
|
||||
short_announcement: "/sDownstairs Dishwasher complete"
|
||||
# long_announcement: # Created by the processor
|
||||
matrix_indicator: "dish2,1,15,10,6,5,1,0"
|
||||
|
||||
resolution: 5
|
||||
standby_power: 3
|
||||
operating_power_min: 30
|
||||
|
||||
announcement_enabled: true
|
||||
announcement_channels: "pushover_zorruno"
|
||||
short_announcement: "/sDownstairs Dishwasher complete"
|
||||
# long_announcement: # Generated by the processor
|
||||
announcement_payload: ""
|
||||
matrix_indicator: "dish2,1,15,10,6,5,1,0"
|
||||
mqtt_feed: "Downstairs_dishwasher_complete"
|
||||
|
||||
#:##################################################################################:#
|
||||
# EV Charger 32A #
|
||||
#:##################################################################################:#
|
||||
|
||||
- appliance_id: evcharger_32a
|
||||
appliance_name: "EV Charger (32A)"
|
||||
@@ -167,88 +296,134 @@ automation:
|
||||
power_entity: "sensor.main_house_3_phase_power_monitor_32a_wallcharger_power"
|
||||
monitor_sensor: "sensor.appliance_monitor_ev_charger_32a_monitor"
|
||||
icon: "mdi:ev-plug-type2"
|
||||
short_announcement: "/s/s32A EV Charging complete"
|
||||
# long_announcement: # Created by the processor
|
||||
matrix_indicator: "ev32a,1,15,10,6,5,1,0"
|
||||
|
||||
resolution: 6
|
||||
standby_power: 3
|
||||
operating_power_min: 100
|
||||
announcement_channels: "pushover_zorruno"
|
||||
|
||||
announcement_enabled: true
|
||||
announcement_channels: "pushover_zorruno,pushover_kim"
|
||||
short_announcement: "/s/s32A EV Charging complete"
|
||||
# long_announcement: # Generated by the processor
|
||||
announcement_payload: ""
|
||||
matrix_indicator: "ev32a,1,15,10,6,5,1,0"
|
||||
mqtt_feed: "Atto_Charger_complete"
|
||||
|
||||
#:##################################################################################:#
|
||||
# EV Charger 16A #
|
||||
#:##################################################################################:#
|
||||
|
||||
- appliance_id: evcharger_16a
|
||||
appliance_name: "EV Charger (16A)"
|
||||
appliance_action: "charging"
|
||||
power_entity: "sensor.main_house_3_phase_power_monitor_32a_wallcharger_power"
|
||||
monitor_sensor: "sensor.garage_db_control_16a_wallcharger_power"
|
||||
power_entity: "sensor.garage_db_control_16a_wallcharger_power"
|
||||
monitor_sensor: "sensor.appliance_monitor_ev_charger_16a_monitor"
|
||||
icon: "mdi:ev-plug-type1"
|
||||
short_announcement: "/s/s16A EV Charging complete"
|
||||
# long_announcement: # Created by the processor
|
||||
matrix_indicator: "ev16a,1,15,10,6,5,1,0"
|
||||
|
||||
resolution: 6
|
||||
standby_power: 3
|
||||
operating_power_min: 100
|
||||
|
||||
announcement_enabled: true
|
||||
announcement_channels: "pushover_zorruno"
|
||||
short_announcement: "/s/s16A EV Charging complete"
|
||||
# long_announcement: # Generated by the processor
|
||||
announcement_payload: ""
|
||||
matrix_indicator: "ev16a,1,15,10,6,5,1,0"
|
||||
mqtt_feed: "Leaf_Charger_complete"
|
||||
|
||||
#:##################################################################################:#
|
||||
# Ryobi Charger Left #
|
||||
#:##################################################################################:#
|
||||
|
||||
- appliance_id: ryobicharger_left
|
||||
appliance_name: "Ryobi Charger Left"
|
||||
appliance_action: "charging"
|
||||
power_entity: "sensor.ryobi_charger_left_power_monitor_x17pp_power"
|
||||
#monitor_sensor: "sensor.ryobi_charger_left_power_monitor_x17pp_power"
|
||||
icon: "mdi:battery-charging-medium"
|
||||
short_announcement: "/s/sRyobi Charging Left"
|
||||
# long_announcement: # Created by the processor
|
||||
matrix_indicator: "ryo1,1,15,10,6,5,1,0"
|
||||
|
||||
resolution: 4
|
||||
standby_power: 1
|
||||
operating_power_min: 20
|
||||
|
||||
announcement_enabled: true
|
||||
announcement_channels: "pushover_zorruno"
|
||||
short_announcement: "/s/sRyobi Charging Left"
|
||||
# long_announcement: # Generated by the processor
|
||||
announcement_payload: ""
|
||||
matrix_indicator: "ryo1,1,15,10,6,5,1,0"
|
||||
mqtt_feed: "Ryobi_Charger_1_complete"
|
||||
|
||||
#:##################################################################################:#
|
||||
# Ryobi Charger Right #
|
||||
#:##################################################################################:#
|
||||
|
||||
- appliance_id: ryobicharger_right
|
||||
appliance_name: "Ryobi Charger Right"
|
||||
appliance_action: "charging"
|
||||
power_entity: "sensor.ryobi_charger_right_power_monitor_x16pp_power"
|
||||
#monitor_sensor: "sensor.ryobi_charger_right_power_monitor_x16pp_power"
|
||||
icon: "mdi:battery-charging-medium"
|
||||
short_announcement: "/s/sRyobi Charging Right"
|
||||
# long_announcement: # Created by the processor
|
||||
matrix_indicator: "ryo2,1,15,10,6,5,1,0"
|
||||
|
||||
resolution: 4
|
||||
standby_power: 1
|
||||
operating_power_min: 20
|
||||
|
||||
announcement_enabled: true
|
||||
announcement_channels: "pushover_zorruno"
|
||||
short_announcement: "/s/sRyobi Charging Right"
|
||||
# long_announcement: # Generated by the processor
|
||||
announcement_payload: ""
|
||||
matrix_indicator: "ryo2,1,15,10,6,5,1,0"
|
||||
mqtt_feed: "Ryobi_Charger_2_complete"
|
||||
|
||||
#:##################################################################################:#
|
||||
# Pool Pump #
|
||||
#:##################################################################################:#
|
||||
|
||||
- appliance_id: pool_pump
|
||||
appliance_name: "Pool Pump"
|
||||
appliance_action: "pumping"
|
||||
power_entity: "sensor.esp_poolpumppower_power"
|
||||
#monitor_sensor: "sensor.ryobi_charger_right_power_monitor_x16pp_power"
|
||||
icon: "mdi:pool"
|
||||
short_announcement: "Pool Pump Off"
|
||||
# long_announcement: # Created by the processor
|
||||
matrix_indicator: "pump,1,15,10,6,5,1,0"
|
||||
|
||||
resolution: 4
|
||||
standby_power: 5
|
||||
operating_power_min: 20
|
||||
|
||||
announcement_enabled: true
|
||||
announcement_channels: "pushover_zorruno"
|
||||
short_announcement: "Pool Pump Off"
|
||||
# long_announcement: # Generated by the processor
|
||||
announcement_payload: ""
|
||||
matrix_indicator: "pump,1,15,10,6,5,1,0"
|
||||
mqtt_feed: "pool_pump"
|
||||
|
||||
#:##################################################################################:#
|
||||
# 3D Printer #
|
||||
#:##################################################################################:#
|
||||
|
||||
- appliance_id: 3d_printer
|
||||
appliance_name: "3D Printer"
|
||||
appliance_action: "printing"
|
||||
power_entity: "sensor.esp_3dprinterpow_load_power"
|
||||
#monitor_sensor: "sensor.ryobi_charger_right_power_monitor_x16pp_power"
|
||||
icon: "mdi:printer-3d"
|
||||
short_announcement: "3D printer finished"
|
||||
# long_announcement: # Created by the processor
|
||||
matrix_indicator: "pump,1,15,10,6,5,1,0"
|
||||
|
||||
resolution: 4
|
||||
standby_power: 2
|
||||
operating_power_min: 20
|
||||
|
||||
announcement_enabled: true
|
||||
announcement_channels: "pushover_zorruno"
|
||||
short_announcement: "3D printer finished"
|
||||
# long_announcement: # Generated by the processor
|
||||
announcement_payload: ""
|
||||
matrix_indicator: "pump,1,15,10,6,5,1,0"
|
||||
mqtt_feed: "3d_printer"
|
||||
|
||||
action:
|
||||
##########################################################################
|
||||
# PUBLISH / REFRESH MQTT DISCOVERY CONFIG
|
||||
##########################################################################
|
||||
#:####################################################################################:#
|
||||
# PUBLISH / REFRESH MQTT DISCOVERY CONFIG #
|
||||
#:####################################################################################:#
|
||||
|
||||
- repeat:
|
||||
for_each: "{{ am_appliances }}"
|
||||
@@ -285,19 +460,18 @@ automation:
|
||||
identifiers=[mqtt_device_name],
|
||||
name='Appliance Monitor',
|
||||
manufacturer='View Road Home Assistant',
|
||||
model='Shared appliance power monitor'
|
||||
model='Shared appliance power monitor',
|
||||
sw_version='1.5'
|
||||
)
|
||||
) | to_json
|
||||
}}
|
||||
|
||||
##########################################################################
|
||||
# PROCESS SAMPLES
|
||||
##########################################################################
|
||||
#:####################################################################################:#
|
||||
# PROCESS SAMPLES #
|
||||
#:####################################################################################:#
|
||||
#
|
||||
# Always process every appliance. The processor receives power_w as a safe
|
||||
# float value, so unavailable/non-numeric sensors become 0 W.
|
||||
#
|
||||
##########################################################################
|
||||
# float value, so unavailable or non-numeric sensors become 0 W.
|
||||
|
||||
- repeat:
|
||||
for_each: "{{ am_appliances }}"
|
||||
@@ -309,36 +483,97 @@ automation:
|
||||
am_monitor_sensor: >-
|
||||
{{
|
||||
repeat.item.monitor_sensor
|
||||
| default('sensor.' ~ mqtt_device_name ~ '_' ~ repeat.item.appliance_id ~ '_monitor', true)
|
||||
| default(
|
||||
'sensor.'
|
||||
~ mqtt_device_name
|
||||
~ '_'
|
||||
~ repeat.item.appliance_id
|
||||
~ '_monitor',
|
||||
true
|
||||
)
|
||||
}}
|
||||
|
||||
am_title: >-
|
||||
{{ repeat.item.title | default(repeat.item.appliance_name ~ ' Notification', true) }}
|
||||
{{
|
||||
repeat.item.title
|
||||
| default(
|
||||
repeat.item.appliance_name ~ ' Notification',
|
||||
true
|
||||
)
|
||||
}}
|
||||
|
||||
am_announcement_enabled: >-
|
||||
{{
|
||||
repeat.item.announcement_enabled
|
||||
| default(am_default_announcement_enabled)
|
||||
}}
|
||||
|
||||
am_announcement_channels: >-
|
||||
{{ repeat.item.announcement_channels | default(am_default_announcement_channels, true) }}
|
||||
{{
|
||||
repeat.item.announcement_channels
|
||||
| default(am_default_announcement_channels, true)
|
||||
}}
|
||||
|
||||
am_debug_flow: >-
|
||||
{{ repeat.item.debug_flow | default(am_default_debug_flow, true) }}
|
||||
am_announcement_payload: >-
|
||||
{{
|
||||
repeat.item.announcement_payload
|
||||
| default(am_default_announcement_payload, true)
|
||||
}}
|
||||
|
||||
am_resolution: >-
|
||||
{{ repeat.item.resolution | default(am_default_resolution, true) }}
|
||||
am_mqtt_feed: >-
|
||||
{{
|
||||
repeat.item.mqtt_feed
|
||||
| default(repeat.item.appliance_id, true)
|
||||
}}
|
||||
|
||||
am_standby_power: >-
|
||||
{{ repeat.item.standby_power | default(am_default_standby_power, true) }}
|
||||
am_short_announcement: >-
|
||||
{{
|
||||
repeat.item.short_announcement
|
||||
| default(
|
||||
(repeat.item.appliance_action | title) ~ ' complete',
|
||||
true
|
||||
)
|
||||
}}
|
||||
|
||||
am_operating_power_min: >-
|
||||
{{ repeat.item.operating_power_min | default(am_default_operating_power_min, true) }}
|
||||
|
||||
am_min_cycle_notify_seconds: >-
|
||||
{{ repeat.item.min_cycle_notify_seconds | default(am_default_min_cycle_notify_seconds, true) }}
|
||||
|
||||
am_power_w: >-
|
||||
{{ states(repeat.item.power_entity) | float(0) }}
|
||||
am_matrix_indicator: >-
|
||||
{{ repeat.item.matrix_indicator | default('', true) }}
|
||||
|
||||
am_long_announcement: >-
|
||||
{{ repeat.item.long_announcement | default('', true) }}
|
||||
|
||||
am_debug_flow: >-
|
||||
{{
|
||||
repeat.item.debug_flow
|
||||
| default(am_default_debug_flow)
|
||||
}}
|
||||
|
||||
am_resolution: >-
|
||||
{{
|
||||
repeat.item.resolution
|
||||
| default(am_default_resolution, true)
|
||||
}}
|
||||
|
||||
am_standby_power: >-
|
||||
{{
|
||||
repeat.item.standby_power
|
||||
| default(am_default_standby_power, true)
|
||||
}}
|
||||
|
||||
am_operating_power_min: >-
|
||||
{{
|
||||
repeat.item.operating_power_min
|
||||
| default(am_default_operating_power_min, true)
|
||||
}}
|
||||
|
||||
am_min_cycle_notify_seconds: >-
|
||||
{{
|
||||
repeat.item.min_cycle_notify_seconds
|
||||
| default(am_default_min_cycle_notify_seconds, true)
|
||||
}}
|
||||
|
||||
am_power_w: >-
|
||||
{{ states(repeat.item.power_entity) | float(0) }}
|
||||
|
||||
- action: script.appliance_monitor_process_sample
|
||||
data:
|
||||
appliance_id: "{{ repeat.item.appliance_id }}"
|
||||
@@ -355,8 +590,11 @@ automation:
|
||||
operating_power_min: "{{ am_operating_power_min }}"
|
||||
min_cycle_notify_seconds: "{{ am_min_cycle_notify_seconds }}"
|
||||
|
||||
announcement_enabled: "{{ am_announcement_enabled }}"
|
||||
announcement_channels: "{{ am_announcement_channels }}"
|
||||
short_announcement: "{{ repeat.item.short_announcement }}"
|
||||
long_announcement: "{{ am_long_announcement }}"
|
||||
title: "{{ am_title }}"
|
||||
matrix_indicator: "{{ repeat.item.matrix_indicator }}"
|
||||
short_announcement: "{{ am_short_announcement }}"
|
||||
long_announcement: "{{ am_long_announcement }}"
|
||||
announcement_payload: "{{ am_announcement_payload }}"
|
||||
matrix_indicator: "{{ am_matrix_indicator }}"
|
||||
mqtt_feed: "{{ am_mqtt_feed }}"
|
||||
|
||||
Reference in New Issue
Block a user