Closed sockmonkey0223 closed 3 weeks ago
I've been able to replicate this, rather than try and kludge a change to the automation I'll fix this as a new release on the battery replaced service itself.
This is now fixed in the 2.3.6 release, thanks for reporting it.
Hi,
I realise this issue is closed, but I am experiencing this same issue, the source_entity_id is empty.
I am running Battery Notes v2.3.9 HA: 2024.6.4
I have attached the log from my automation. I have tested the event data on multiple devices all with the same issue.
If I can provide any more information please let me know.
This is the event data:
event_type: battery_notes_battery_increased data: device_id: f86a43d6399a8335de1e51a0d1e0992b source_entity_id: "" device_name: Bedroom Window battery_low: false battery_type_and_quantity: Rechargeable battery_type: Rechargeable battery_quantity: 1 battery_level: 100 previous_battery_level: 10 origin: LOCAL time_fired: "2024-06-25T09:59:26.093334+00:00" context: id: 01J17DC04D44FYRSPCKY6DMPVA parent_id: null user_id: null
source_entity_id is also empty in the event battery_notes_battery_threshold.
event_type: battery_notes_battery_threshold data: device_id: f86a43d6399a8335de1e51a0d1e0992b source_entity_id: "" device_name: Bedroom Window battery_low: true battery_type_and_quantity: Rechargeable battery_type: Rechargeable battery_quantity: 1 battery_level: 5 previous_battery_level: 100 reminder: false origin: LOCAL time_fired: "2024-06-25T10:25:50.137025+00:00" context: id: 01J17EWB1S6S6Q6V5X008KKCXB parent_id: null user_id: null
Hi @sambarlick it looks like this is a different issue. source_entity_id can be "", it was previously NULL and that caused the original issue.
I've just found one area of the documentation where the parameter was wrongly named, assuming you have your own automation the action should look like this, I can see from the error it's trying to call the service with entity_id instead of source_entity_id.
action:
- service: battery_notes.set_battery_replaced
data:
device_id: "{{ trigger.event.data.device_id }}"
source_entity_id: "{{ trigger.event.data.source_entity_id }}"
System Health details
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1470 Downloaded Repositories | 112 HACS Data | okAccuWeather
can_reach_server | ok -- | -- remaining_requests | 19Home Assistant Cloud
logged_in | true -- | -- subscription_expiration | July 6, 2024 at 8:00 PM relayer_connected | true relayer_region | us-east-1 remote_enabled | true remote_connected | true alexa_enabled | true google_enabled | false remote_server | us-east-1-1.ui.nabu.casa certificate_status | ready instance_id | can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okHome Assistant Supervisor
host_os | Home Assistant OS 12.3 -- | -- update_channel | stable supervisor_version | supervisor-2024.06.0 agent_version | 1.6.0 docker_version | 25.0.5 disk_total | 30.8 GB disk_used | 11.7 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | kvm board | ova supervisor_api | ok version_api | ok installed_addons | Samba share (12.3.1), Mosquitto broker (6.4.1), Let's Encrypt (5.0.18), TasmoAdmin (0.30.3), AppDaemon (0.16.6), chrony (3.0.1), Advanced SSH & Web Terminal (18.0.0), Samba Backup (5.2.0), ESPHome (2024.5.5), Z-Wave JS (0.5.0), Whisper (2.1.0), Piper (1.5.0), openWakeWord (1.10.0), Matter Server (6.1.1), Tesla HTTP Proxy (2.2.7)Dashboards
dashboards | 8 -- | -- resources | 61 views | 34 mode | storageRecorder
oldest_recorder_run | March 13, 2024 at 10:52 PM -- | -- current_recorder_run | June 8, 2024 at 12:47 PM estimated_db_size | 15427.38 MiB database_engine | mysql database_version | 10.11.7Checklist
battery_notes:
to my configuration.yaml and restarted.Describe the issue
I set up the Community "Battery Replaced" automation. When I replaced a battery today (0% --> 100%) the automation triggered but failed with an error:
Full automation YAML:
configuration.yaml:
Reproduction steps
Debug logs
Diagnostics dump
Cannot download, diagnostics error: