Releases: andrew-codechimp/HA-Battery-Notes
2.3.8
What's Changed
- Fix service call null device/entity id issue #1750
- Updated Russian translation, thanks LordArrin via Crowdin
- Updated French translation, thanks tunisiano187 via Crowdin
- Added Serbian (Latin) translation, thanks @darkobg79
2.3.7
What's Changed
- Fix service call null device/entity id issue #1750
- Updated Russian translation, thanks LordArrin via Crowdin
- Updated French translation, thanks tunisiano187 via Crowdin
- Added Serbian (Latin) translation, thanks @darkobg79
2.3.6
What's Changed
- Fix service call null device/entity id issue #1750
- Updated Russian translation, thanks LordArrin via Crowdin
- Added Serbian (Latin) translation, thanks @darkobg79
2.3.5
What's Changed
- Fix blocking file io warning in HA 2024.6
- Remove attributes from recorder
- Updated Slovak translation, thanks Sonics007 via Crowdin
2.3.4
What's Changed
- Fix blocking file io warning in HA 2024.6
2.3.3
What's Changed
- Fix blocking file io warning in HA 2024.6
2.3.2
What's Changed
🚀 Ability to add battery notes to entity's as well device's.
When an entity does not have a device, or a device has multiple battery entities you can now manually add a battery note and choose the specific entity you want the battery note associated with.
Discovery will still work on a device level and guess the correct battery so with devices that have multiple battery entities you will have to add these manually.
- Updated Greek translations, thanks Thunderstrike116 via crowdin
⚠️ Breaking change to automations
This new feature requires a change to the Set battery replaced
service, which now takes both an optional source_entity_id and device_id, one must be specified and source_entity_id is used if both are specified. All events now have data for the source_entity_id as well, which means you can modify your automations based on the events to call the service with both source_entity_id and device_id.
This will not break existing automations, but unless you add the source_entity_id to data any entity associated battery notes will not trigger the battery replaced service.
If you are using notification_id with the device_id this should be changed to also include the entity_id to distinguish multiple battery notes for the same device, e.g. notification_id: "{{ trigger.event.data.device_id }}-{{ trigger.event.data.source_entity_id }}"
If you are using the blueprints there are updates available to these to support the entity based battery notes, reimport the blueprints to get the updates.
alias: Battery Replaced
description: Battery Replaced
trigger:
- platform: event
event_type: battery_notes_battery_increased
condition: []
action:
- service: battery_notes.set_battery_replaced
data:
device_id: "{{ trigger.event.data.device_id }}"
entity_id: "{{ trigger.event.data.source_entity_id }}"
mode: queued
alias: Battery Low Notification
description: Battery Low Notification with auto dismiss
trigger:
- platform: event
event_type: battery_notes_battery_threshold
event_data:
battery_low: true
id: low
alias: Battery went low
- platform: event
event_type: battery_notes_battery_threshold
event_data:
battery_low: false
id: high
alias: Battery went high
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- low
sequence:
- service: persistent_notification.create
data:
title: |
{{ trigger.event.data.device_name }} Battery Low
notification_id: "{{ trigger.event.data.device_id }}-{{ trigger.event.data.source_entity_id }}"
message: >
The device has a battery level of {{
trigger.event.data.battery_level }}% {{ '\n' -}} You need {{
trigger.event.data.battery_quantity }}× {{
trigger.event.data.battery_type }}
- conditions:
- condition: trigger
id:
- high
sequence:
- service: persistent_notification.dismiss
data:
notification_id: "{{ trigger.event.data.device_id }}-{{ trigger.event.data.source_entity_id }}"
mode: queued
2.3.1
What's Changed
Ability to add battery notes to entity's as well device's.
When an entity does not have a device, or a device has multiple battery entities you can now manually add a battery note and choose the specific entity you want the battery note associated with.
Discovery will still work on a device level and guess the correct battery so with devices that have multiple battery entities you will have to add these manually.
- Updated Greek translations, thanks Thunderstrike116 via crowdin
Breaking change to automations
This new feature requires a change to the Set battery replaced
service, which now takes both an optional source_entity_id and device_id, one must be specified and source_entity_id is used if both are specified. All events now have data for the source_entity_id as well, which means you can modify your automations based on the events to call the service with both source_entity_id and device_id.
This will not break existing automations, but unless you add the source_entity_id to data any entity associated battery notes will not trigger the battery replaced service.
If you are using notification_id with the device_id this should be changed to also include the entity_id to distinguish multiple battery notes for the same device, e.g. notification_id: "{{ trigger.event.data.device_id }}-{{ trigger.event.data.source_entity_id }}"
If you are using the blueprints these will not be updated until the official release, whilst in beta create your own automations or modify the blueprint manually.
alias: Battery Replaced
description: Battery Replaced
trigger:
- platform: event
event_type: battery_notes_battery_increased
condition: []
action:
- service: battery_notes.set_battery_replaced
data:
device_id: "{{ trigger.event.data.device_id }}"
entity_id: "{{ trigger.event.data.source_entity_id }}"
mode: queued
alias: Battery Low Notification
description: Battery Low Notification with auto dismiss
trigger:
- platform: event
event_type: battery_notes_battery_threshold
event_data:
battery_low: true
id: low
alias: Battery went low
- platform: event
event_type: battery_notes_battery_threshold
event_data:
battery_low: false
id: high
alias: Battery went high
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- low
sequence:
- service: persistent_notification.create
data:
title: |
{{ trigger.event.data.device_name }} Battery Low
notification_id: "{{ trigger.event.data.device_id }}-{{ trigger.event.data.source_entity_id }}"
message: >
The device has a battery level of {{
trigger.event.data.battery_level }}% {{ '\n' -}} You need {{
trigger.event.data.battery_quantity }}× {{
trigger.event.data.battery_type }}
- conditions:
- condition: trigger
id:
- high
sequence:
- service: persistent_notification.dismiss
data:
notification_id: "{{ trigger.event.data.device_id }}-{{ trigger.event.data.source_entity_id }}"
mode: queued
2.3.0
What's Changed
Ability to add battery notes to entity's as well device's.
When an entity does not have a device, or a device has multiple battery entities you can now manually add a battery note and choose the specific entity you want the battery note associated with.
Discovery will still work on a device level and guess the correct battery so with devices that have multiple battery entities you will have to add these manually.
Breaking change to automations
This new feature requires a change to the Set battery replaced
service, which now takes both an optional source_entity_id and device_id, one must be specified and source_entity_id is used if both are specified. All events now have data for the source_entity_id as well, which means you can modify your automations based on the events to call the service with both source_entity_id and device_id.
This will not break existing automations, but unless you add the source_entity_id to data any entity associated battery notes will not trigger the battery replaced service.
If you are using notification_id with the device_id this should be changed to also include the entity_id to distinguish multiple battery notes for the same device, e.g. notification_id: "{{ trigger.event.data.device_id }}-{{ trigger.event.data.source_entity_id }}"
If you are using the blueprints these will not be updated until the official release, whilst in beta create your own automations or modify the blueprint manually.
alias: Battery Replaced
description: Battery Replaced
trigger:
- platform: event
event_type: battery_notes_battery_increased
condition: []
action:
- service: battery_notes.set_battery_replaced
data:
device_id: "{{ trigger.event.data.device_id }}"
entity_id: "{{ trigger.event.data.source_entity_id }}"
mode: queued
alias: Battery Low Notification
description: Battery Low Notification with auto dismiss
trigger:
- platform: event
event_type: battery_notes_battery_threshold
event_data:
battery_low: true
id: low
alias: Battery went low
- platform: event
event_type: battery_notes_battery_threshold
event_data:
battery_low: false
id: high
alias: Battery went high
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- low
sequence:
- service: persistent_notification.create
data:
title: |
{{ trigger.event.data.device_name }} Battery Low
notification_id: "{{ trigger.event.data.device_id }}-{{ trigger.event.data.source_entity_id }}"
message: >
The device has a battery level of {{
trigger.event.data.battery_level }}% {{ '\n' -}} You need {{
trigger.event.data.battery_quantity }}× {{
trigger.event.data.battery_type }}
- conditions:
- condition: trigger
id:
- high
sequence:
- service: persistent_notification.dismiss
data:
notification_id: "{{ trigger.event.data.device_id }}-{{ trigger.event.data.source_entity_id }}"
mode: queued
2.2.8
What's Changed
Add Swedish translation, thanks Daniel Goransson via Crowdin
Update German translation, thanks DJaeger via Crowdin
Update Dutch translation, thanks Jorim Tielemans via Crowdin
Minor bug fixes