@Blacky ı made a counter which counts the number of cups of coffee prepared by my coffee machine.
the blueprint does increase a counter when a coffee is prepared.
however it does also increase the counter when i just turn the machine on and it starts pre heating.
see attached power usage of pre heating and 2 examples of powerusage when preparing coffee.
how do i need to setup the blueprint to just count coffee preparation?
I played with the settings and shortened the running dead zone and it appears to be working fine. Although it works fine, when I look at the trace it still shows the message " stopped because only a single execution is allowed" after a very short time, but yet it finishes and notifies us. In any case all good now and thanks for the blueprint and your help.
Handling this with this BP might be challenging, and achieving the desired accuracy could be difficult. Have you considered using a switch instead? While Iām not familiar with the specifics of your coffee machine, for mine, if I wanted to count the number of coffees, I would connect a device to the switch that indicates when a shot or the water pump is ON (like a Shelly 1 Mini Gen3), signaling that coffee is being made.
To prevent false triggers during cleaning or purging, you could require the switch to remain ON for a specific duration, typically 6 to 8 secondsāthe typical time for a shot.
I hope this helps you.
Blacky
Thanks for the update and glad it is working for you.
This is normal, nothing to be concerned about.
Blacky
FAQ - A Guide to Notification Options on iOS and Android Devices
iOS ONLY OPTIONS
What are Notification Interruption Levels on iOS?
On devices running iOS 15 and later, you can configure the interruption level for your notifications to ensure they are delivered according to your preferences. This feature allows you to choose how notifications are presented and how they interrupt your activities.
Interruption level | Breaks through Focus | Overrides Ring/Silent switch on iPhone and iPad |
---|---|---|
Default | No | No |
Critical Notification | Yes | Yes |
Time Sensitive Notification | Yes - Must be enabled in focus | No |
Quiet notifications without waking screen | No | No |
Notification Sound - iOS Only
The Home Assistant app for iOS includes built-in notification sounds, and you can import sounds from your iOS device into the app. Custom sounds can also be added via iTunes or from your cloud storage.
Note: In the blueprint, make sure to enter the full filename (including the file extension) in the Notification Sound (iOS Only) input, as shown below. If left blank, your device will play the default notification sound based on its settings.
-
Built-in Notification Sounds:
- In the Home Assistant app, depending on your access you have 2 options, go to
Settings > Companion App > Notifications > Sounds
.App Configuration > Notifications > Sounds
.
- Tap the Bundled tab.
- In the Home Assistant app, depending on your access you have 2 options, go to
-
iOS Device Sounds:
- In the Home Assistant app, depending on your access you have 2 options, go to
Settings > Companion App > Notifications > Sounds
.App Configuration > Notifications > Sounds
.
- Tap the System tab, then Import system sounds.
- Wait for the sounds to load and restart your device.
- In the Home Assistant app, depending on your access you have 2 options, go to
-
Via iTunes:
- Connect your device and open iTunes.
- Select your device and go to File Sharing.
- Choose Home Assistant and add your WAV files (formatted as 32-bit float 48000Hz).
- Click Sync and disconnect the device.
- In the Home Assistant app, depending on your access you have 2 options, go to
Settings > Companion App > Notifications > Sounds
.App Configuration > Notifications > Sounds
.
- Tap the Import tab and select Import sounds from iTunes File Sharing.
-
Via Cloud Storage:
- Install and log in to your cloud storage app (e.g., Dropbox, Google Drive).
- Upload your WAV files (formatted as 32-bit float 48000Hz) to the cloud.
- In the Home Assistant app, depending on your access you have 2 options, go to
Settings > Companion App > Notifications > Sounds
.App Configuration > Notifications > Sounds
.
- Tap the Import tab, select Import custom sound, choose your files, and tap Done.
- Restart your device if needed.
ANDROID ONLY OPTIONS
What are High Priority Notifications?
Notifications will appear immediately in most cases. However, in some cases (such as when the phone is stationary or when the screen has been turned off for a prolonged period of time), default notifications will not ring the phone until the screen is turned on. High priority notifications are designed to alert you to important events or updates that require your immediate attention, ensuring they are received promptly even in these situations.
What are Sticky Notifications?
Sticky notifications are a type of notification that remain on your deviceās notification shade until they are manually dismissed by the user. Unlike regular notifications, which can disappear when they are tapped, sticky notifications ensure that important messages are persistently visible until you actively clear or swipe them away, ensuring that critical information stays visible until addressed.
Notification Channels
What are Notification Channels?
Notification channels are a feature for Android devices only. They allow you to categorize notifications, making it easier to manage and prioritize them. Each channel can have its own settings, such as notification style, sound, vibration, blink light, app icon badges, locked screen, and do not disturb, ensuring that you receive notifications in the manner most appropriate for each type of notification you receive.
How Do I Create a Notification Channel?
Before creating channels, it is best to consider what channels you would like to have for your notifications. This will help you structure it correctly, as once you create a channel, it can be removed but will never be deleted unless you reset your app. Taking the time to consider how you would like it structured will help you in the long run.
Some ideas for a channel structure are as follows:
You could just set the notification type. Emergency, General Notification, Dinner Ready, Time for Bed, Appliance Finished, etc.
Or maybe something like this.
- Critical
- Sound and pop-up.
- Vibrate.
- Blink light.
- Locked screen.
- Ignore Do Not Disturb.
- Description : Notifications for emergency situations (e.g., fire alarm, flood alert, smoke detector, carbon monoxide detector, security breaches).
- High
- Sound and pop-up.
- Vibrate.
- Locked screen.
- Ignore Do Not Disturb.
- Description : Notifications for reminders (e.g., upcoming appointment, power outage, rubbish reminder).
- General (Default)
- Sound.
- Vibrate.
- Description : Notifications for general updates (e.g., appliance finished, battery low).
- Low
- Silent.
- Vibrate.
- Description : Notifications for less critical updates (e.g., appliance started, unavailable sensor, battery low).
- Minimal
- Silent and minimized.
- Description : Notifications for non-urgent updates (e.g., reminder, Home Assistant update avalible).
To create a new channel, simply enter a name in the input. When your automation sends the first notification, it will create the channel on your device. After the channel is created, you can customize its notification settings to your preference directly on your device.
How Do I Edit a Notification Channel?
There are a few ways to do this:
- On your device, go into Settings > Notifications > Home Assistant and you will see categories. These are your channels. Select the one you would like to customize and make your adjustments.
- When a notification is received, slowly slide it to the left and you will see a settings icon. Click on it, and it will take you to categories. These are your channels. Select the one you would like to customize and make your adjustments.
How Do I Delete a Notification Channel?
I have a blueprint that will help you remove a notification channel. See link below.
Android Notification Channel Manager
Hope this helps to explain some of the settings
Enjoy
Blacky
Back to FAQ: Click Here
In this update, we focus solely on notification delivery options for iOS and Android.
New Feature For iOS
- Interruption Level - On devices running iOS 15 and later, you can now configure the interruption level for your notifications to ensure they are delivered according to your preferences. Choose the desired interruption level from the dropdown list. Critical and time-sensitive notifications must be turned ON within the Home Assistant App, and time-sensitive notifications must be allowed in your Focus settings.
New Feature For Android
-
High Priority notifications ensure that you receive important alerts immediately. These notifications bypass normal delivery delays and are delivered instantly to your device.
-
Sticky Notification ensure that important alerts are not dismissed when selected. They remain on your notification screen until you actively clear or swipe them away, ensuring that critical information stays visible until addressed.
-
Notification Channel allow you to easily organize different notification settings, including notification sounds, vibrations, and other device-specific features. Before crating a channel make sure you understand them and how they work. I have a FAQ that has information on channels, click here.
Maintenance
- Clean up of some code.
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Enjoy
Blacky
I used this blueprint from version 1.8, last week I updated when I found out that it wasnāt working anymore. Thought it was because of a new phone. Now with version 2.3 it wonāt send me notifications, not on my phone nor my laptop. Other notifications are coming trough, itās only with this blueprint that itās not working properly.
The setup is very basic: if power is over 10W for at least 1 minute proceed and if below 1W for at least 1 minute send me an end notification. This has to be between 6 AM and 22.30 PM. Other settings are disabled.
Tracing stops at the time-check.
The YAML:
alias: Wasmachine klaar
description: Bij wasmachine klaar komt er een notificatie.
use_blueprint:
path: Blackshome/appliance-notifications.yaml
input:
power_sensor: sensor.wasmachine_vermogen
end_appliance_power: 1
include_end_notify: enable_end_notify_options
end_notify_device:
- 1f263f6902f4f8e9c53f26c7789a8666
- 98ab17228bda628e7beacfddba462e8b
end_message_title: Wasmachine klaar
end_message: Jippieee, weer een lading!
include_time: time_enabled
after_time: "06:00:00"
before_time: "22:30:00"
Any ideas trying to solve this?
Welcome to the community.
O no thatās not good
Tested it here using your YAML (Thanks) and it works Note, android device sometimes donāt receive / show a message until you unlock it so there are other android settings you can use to overcome that.
I did fix a time issue that it must be within you time you selected. Before if it started the automation within the time frame it would send you a end message regardless but now your end message must also be within your time frame (makes sense ). So if it is stopping at the time check then your end message is out of hours. It probably doing what you asked.
If you disable time or adjust it so your within your hours do you get the message?
Blacky
Thanks for your response and checking.
My testing was within the timeframe. I did disable the time-check for now. I did not erase the times, hence it stays in the YAML:
alias: Wasmachine klaar
description: Bij wasmachine klaar komt er een notificatie.
use_blueprint:
path: Blackshome/appliance-notifications.yaml
input:
power_sensor: sensor.wasmachine_vermogen
end_appliance_power: 1
include_end_notify: enable_end_notify_options
end_notify_device:
- 1f263f6902f4f8e9c53f26c7789a8666
- 98ab17228bda628e7beacfddba462e8b
end_message_title: Wasmachine klaar
end_message: Jippieee, weer een lading!
include_time: time_disabled
after_time: "06:00:00"
before_time: "22:30:00"
Clicking the run (?) button results in nothing but silence.
EDIT: To show the tracing see this image and the YAML that goes with it.
choose:
- alias: Check time condition
conditions:
- '{{ include_time == ''time_enabled'' }}'
- condition: time
after: '22:30:00'
before: '06:00:00'
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
sequence:
- stop: Stop the automation
I have checked it here with iOS and Android and I got the message. Are you using android or iOS?.
That trace is showing that it is waiting for it to drop below 1 watt for 1 min not time. Look back on the trace line. It can be confusing.
I use iOS 17.6 (latest). All other notifications come trough.
It hasnāt dropped below 1 watt. Look at the time notes in the trace you will see āThis step was not executed and so no further trace information is available.ā it waiting for the power to drop. iOS will come through.
Your at this point on your trace line.
Check.
With the time limits set to 0,25 (both start and end) i could trigger it with the Developers tools ā State setting it to over the minimum limit. Got the notifications! So it is workingā¦
Thank you for your quick reply and problem solving. My bad for not thinking about the State setting before.
Keep up the good work!
Nice one glad you got it up and running again
HAPPY DAYS!!
Blacky
Hi. This uses to work, but does not fit my washer or dryer. They are producing watts. I also notice nothing happens when I press run. I am running 2.3
alias: "Appliance: Washer Finished"
description: ""
use_blueprint:
path: Blackshome/appliance-notifications.yaml
input:
power_sensor: sensor.washing_machine_electric_consumption_w
include_end_notify: enable_end_notify_options
end_notify_device:
- 82efe31776fb16cca3166c33f756fef5
- 1cfea90cb9e83023f6859604452adeb5
end_notify_interruption_level: time-sensitive
include_watchdog: disable_watchdog
watchdog_timeframe:
hours: 1
minutes: 30
seconds: 0
watchdog_notify_interruption_level: time-sensitive
include_custom_actions: []
end_custom_actions:
- metadata: {}
data:
entity_id: media_player.sonos_first_floor
message: Washer is finished
action: tts.cloud_say
- metadata: {}
data:
value: "{{ state_attr('media_player.sonos_first_floor', 'volume_level') }}"
target:
entity_id: input_number.media_player_volume_backuo
alias: Get the current volume
enabled: false
action: input_number.set_value
- metadata: {}
data:
volume_level: "{{ states('input_number.media_player_volume_backup') | float }}"
target:
entity_id: media_player.sonos_first_floor
enabled: false
action: media_player.volume_set
end_message_title: Washer done!
end_message: Yippee the washing machine is finished!
watchdog_message: Uh-oh! Time to check the washer.
include_duration_tracking: disable_duration_tracking
include_start_notify: enable_start_notify_options
start_notify_device:
- 1cfea90cb9e83023f6859604452adeb5
- 82efe31776fb16cca3166c33f756fef5
start_notify_data:
- channel
- sticky
end_appliance_power:
Looks like you were editing the automation in YAML. There is a missing input. Adjust the End - Appliance Power Setpoint to your liking.
end_appliance_power: 5
Full code for you
alias: "Appliance: Washer Finished"
description: ""
use_blueprint:
path: Blackshome/appliance-notifications.yaml
input:
power_sensor: sensor.washing_machine_electric_consumption_w
include_end_notify: enable_end_notify_options
end_notify_device:
- 82efe31776fb16cca3166c33f756fef5
- 1cfea90cb9e83023f6859604452adeb5
end_notify_interruption_level: time-sensitive
include_watchdog: disable_watchdog
watchdog_timeframe:
hours: 1
minutes: 30
seconds: 0
watchdog_notify_interruption_level: time-sensitive
include_custom_actions: []
end_custom_actions:
- metadata: {}
data:
entity_id: media_player.sonos_first_floor
message: Washer is finished
action: tts.cloud_say
- metadata: {}
data:
value: "{{ state_attr('media_player.sonos_first_floor', 'volume_level') }}"
target:
entity_id: input_number.media_player_volume_backuo
alias: Get the current volume
enabled: false
action: input_number.set_value
- metadata: {}
data:
volume_level: "{{ states('input_number.media_player_volume_backup') | float }}"
target:
entity_id: media_player.sonos_first_floor
enabled: false
action: media_player.volume_set
end_message_title: Washer done!
end_message: Yippee the washing machine is finished!
watchdog_message: Uh-oh! Time to check the washer.
include_duration_tracking: disable_duration_tracking
include_start_notify: enable_start_notify_options
start_notify_device:
- 1cfea90cb9e83023f6859604452adeb5
- 82efe31776fb16cca3166c33f756fef5
start_notify_data:
- channel
- sticky
end_appliance_power: 5
Blacky
Thanks, yes, was copying and pasting from my phone (nightmare). Got it working now, thanks!
Somehow the blueprint is not triggering for me. Iām using a smart plug to track the power usage of my dryer. The automation should trigger above 20W and it clearly goes above that threshold:
The settings:
alias: Wasdroger is klaar
description: ""
use_blueprint:
path: Blackshome/appliance-notifications.yaml
input:
power_sensor: sensor.plug_droger_power
end_appliance_power: 10
include_watchdog: disable_watchdog
watchdog_timeframe:
hours: 3
minutes: 30
seconds: 0
watchdog_notify_data:
- high_priority
include_custom_actions:
- enable_end_custom_actions
end_custom_actions:
- data:
message: Wasdroger is klaar!
title: Wasdroger š¤
action: notify.notificatiegroep
start_appliance_power: 20
running_dead_zone: 1
watchdog_message: Uh-oh! Time to check the dryer
watchdog_custom_actions: []
include_duration_tracking: disable_duration_tracking
Iām guessing the condition is not matching somehow when I test it by taking control:
Edit: the time option has been disabled:
I have tested your YAML here and it works. I did not test your end custom action though. Remember it must go from below 20W to above to trigger the automation and you have set 1 min that it must be above. You then have a 1 min dead zone and then when if finishes it must go below 10W for 1 min to trigger your end action.
I do not support take control.
Blacky