📳 Appliance Notifications & Actions - Washing Machine - Clothes Dryer - Dish Washer - ETC

FAQ - How To Add A Notification To The UI

  1. First we need to select ‘+ Add Action’ in the custom actions. You can use start or end but the end will be the only one that you can also include your power tracking options.

  2. We then start to type “per” and you will see the ‘Notification: Send a persistent notification’. Select it.

  3. You will then see your title and your message. If you don’t want any power tracking options then just enter in your title and message. If you would like power tracking options then go to step 4.

  4. To use the power tracking options you must enable one of the options. Any enable option will work.

    You must also enter the inputs with red box around them.

    • Power Tracking - Power Sensor
    • Power Tracking - Cost per kWh
    • Power Tracking - Start Number Helper
    • Power Tracking - End Number Helper

  5. Click the 3 dots and select edit in YAML.

  6. You will now see a text input area.

  7. Enter in the code that best suites your needs by copying and pasting it in replacing the code in the text area.

    You will see in the code

    • Enter in your title here
    • Enter in your end message here
    • Consumption
    • Approx Cost $

    Edit the wording to your liking. Select and copy 1 of the 3 code examples provide below.

Code for consumption in kWh only below.

service: notify.persistent_notification
data:
  title: Enter in your title here
  message: >
    Enter in your end message here
    {% set kwh = states(end_power_consumption) | float - states(start_power_consumption) | float %}
    {{'\n'}}Consumption {{kwh | round(2) }} kWh

Code for cost only below.

service: notify.persistent_notification
data:
  title: Enter in your title here
  message: >
    Enter in your end message here
    {% set cost = (states(end_power_consumption) | float - states(start_power_consumption) | float) * (states(cost_per_kwh) | float) %}
    {{'\n'}}Approx Cost ${{cost | round(2) }}

Code for consumption in kWh and cost below.

service: notify.persistent_notification
data:
  title: Enter in your title here
  message: >
    Enter in your end message here
    {% set kwh = states(end_power_consumption) | float - states(start_power_consumption) | float %}
    {{'\n'}}Consumption {{kwh | round(2) }} kWh
    {% set cost = (states(end_power_consumption) | float - states(start_power_consumption) | float) * (states(cost_per_kwh) | float) %}
    {{'\n'}}Approx Cost ${{cost | round(2) }}
  1. The code will look like this the first time you paste it in. If you go back into it, HA will condense it and that is okay.

  2. Once you happy click save, your notification will now show up in the Home Assistant User Interface (UI) as shown below.

    8

EXTRA CODE

If you would like to use the inputs used in the automation for your title, message, Message Power Consumption & Message Cost then please see below.

service: notify.persistent_notification
data:
  title: "{{end_message_title}}"
  message: >
    {{end_message}}
    {% set kwh = states(end_power_consumption) | float - states(start_power_consumption) | float %}
    {{'\n'}}{{end_message_kwh}} {{kwh | round(2) }} kWh
    {% set cost = (states(end_power_consumption) | float - states(start_power_consumption) | float) * (states(cost_per_kwh) | float) %}
    {{'\n'}}{{end_message_cost}}{{cost | round(2) }}

Enjoy

Blacky :smiley:

Back to FAQ: Click Here

2 Likes