File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
custom_components/battery_notes Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 24
24
config_validation as cv ,
25
25
device_registry as dr ,
26
26
entity_registry as er ,
27
+ template ,
27
28
)
28
29
from homeassistant .helpers .event import (
29
30
EventStateChangedData ,
32
33
async_track_template_result ,
33
34
)
34
35
35
- from homeassistant .helpers import template
36
36
from homeassistant .helpers .template import (
37
37
Template ,
38
38
TemplateStateFromEntityId ,
51
51
async_track_entity_registry_updated_event ,
52
52
)
53
53
from homeassistant .helpers .reload import async_setup_reload_service
54
+ from homeassistant .helpers .restore_state import RestoreEntity
54
55
55
56
from homeassistant .const import (
56
57
CONF_NAME ,
@@ -313,7 +314,7 @@ def handle_result(
313
314
314
315
315
316
class BatteryNotesBatteryLowTemplateSensor (
316
- BinarySensorEntity , CoordinatorEntity [BatteryNotesCoordinator ]
317
+ BinarySensorEntity , CoordinatorEntity [BatteryNotesCoordinator ], RestoreEntity
317
318
):
318
319
"""Represents a low battery threshold binary sensor."""
319
320
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class BatteryNotesCoordinator(DataUpdateCoordinator):
58
58
battery_type : str
59
59
battery_quantity : int
60
60
battery_low_threshold : int
61
- battery_low_template : str
61
+ battery_low_template : str | None
62
62
wrapped_battery : RegistryEntry
63
63
_current_battery_level : str = None
64
64
enable_replaced : bool = True
You can’t perform that action at this time.
0 commit comments