mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-19 07:16:29 +00:00
Document RestoreNumber (#1368)
This commit is contained in:
parent
2ae322778a
commit
0d4a63a449
@ -33,6 +33,10 @@ If specifying a device class, your number entity will need to also return the co
|
|||||||
| ---- | ---- | -----------
|
| ---- | ---- | -----------
|
||||||
| temperature | °C, °F | Temperature.
|
| temperature | °C, °F | Temperature.
|
||||||
|
|
||||||
|
## Restoring number states
|
||||||
|
|
||||||
|
Numbers which restore the state after restart or reload should not extend `RestoreEntity` because that does not store the `native_value`, but instead the `state` which may have been modifed by the number base entity. Numbers which restore the state should extend `RestoreNumber` and call `await self.async_get_last_number_data` from `async_added_to_hass` to get access to the stored `native_min_value`, `native_max_value`, `native_step`, `native_unit_of_measurement` and `native_value`.
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
### Set value
|
### Set value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user