Skip to content

Commit

Permalink
Add explanation for source_entity_id
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codechimp committed Jun 30, 2024
1 parent 39f3f63 commit b13de7d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/battery_notes/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set_battery_replaced:
- integration: battery_notes
source_entity_id:
name: Entity
description: Entity that has had its battery replaced.
description: "Entity that has had its battery replaced (only used for entity associated battery notes).",
required: false
selector:
entity:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/battery_notes/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"name": "Device"
},
"entity_id": {
"description": "Entity that has had its battery replaced.",
"description": "Entity that has had its battery replaced (only used for entity associated battery notes).",
"name": "Entity"
},
"datetime_replaced": {
Expand Down
2 changes: 1 addition & 1 deletion docs/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ See how to use this service in the [community contributions](./community.md)
| Parameter | Optional | Description |
| ------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------- |
| `data.device_id` | `yes` | The device id that you want to change the battery replaced date for. |
| `data.source_entity_id` | `yes` | The entity id that you want to change the battery replaced date for. |
| `data.source_entity_id` | `yes` | The entity id that you want to change the battery replaced date for (only used for entity associated battery notes). |
| `data.datetime_replaced` | `yes` | The optional datetime that you want to set the battery replaced to, if omitted the current date/time will be used. |

You must specify either a device_id or entity_id, entity_id will be used in preference if both are specified. This allows the service to work with battery notes associated with both a device and also an individual entity, whether it is part of a device or not.
Expand Down

0 comments on commit b13de7d

Please sign in to comment.