* Turn Ring Doorbell and Chime volumes into number entities.
* turn RingOther volumes into numbers as well
* fix linter issues
* move other volume strings into `number` section
* add back old volume sensors but deprecate them
* add tests for `ring.number`
* add back strings for sensors that have just become deprecated
* remove deprecated volume sensors from test
* Revert "remove deprecated volume sensors from test"
This reverts commit fc95af66e7
.
* create entities for deprecated sensors so that tests still run
* remove print
* add entities immediately
* move `RingNumberEntityDescription` above `RingNumber` and remove unused import
* remove irrelevant comment about history
* fix not using `setter_fn`
* add missing icons for other volume entities
* rename `entity` -> `entity_id` in number tests
* fix typing in number test
* use constants for `hass.services.async_call()`
* use `@refresh_after` decorator instead of delaying updates manually
* move descriptors above entity class
* Use snapshot to test states.
* add missing snapshot file for number platform
* Update homeassistant/components/ring/number.py
Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
---------
Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
33 lines
611 B
Python
33 lines
611 B
Python
"""The Ring constants."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from datetime import timedelta
|
|
|
|
from homeassistant.const import Platform
|
|
|
|
ATTRIBUTION = "Data provided by Ring.com"
|
|
|
|
NOTIFICATION_ID = "ring_notification"
|
|
NOTIFICATION_TITLE = "Ring Setup"
|
|
|
|
DOMAIN = "ring"
|
|
DEFAULT_ENTITY_NAMESPACE = "ring"
|
|
|
|
PLATFORMS = [
|
|
Platform.BINARY_SENSOR,
|
|
Platform.BUTTON,
|
|
Platform.CAMERA,
|
|
Platform.EVENT,
|
|
Platform.LIGHT,
|
|
Platform.NUMBER,
|
|
Platform.SENSOR,
|
|
Platform.SIREN,
|
|
Platform.SWITCH,
|
|
]
|
|
|
|
|
|
SCAN_INTERVAL = timedelta(minutes=1)
|
|
|
|
CONF_2FA = "2fa"
|
|
CONF_LISTEN_CREDENTIALS = "listen_token"
|