mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-09 18:36:51 +00:00
Add config flow for Times of day (#22143)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
parent
c713378903
commit
c03ce6c5a6
@ -6,20 +6,34 @@ ha_category:
|
|||||||
ha_release: 0.89
|
ha_release: 0.89
|
||||||
ha_iot_class: Local Push
|
ha_iot_class: Local Push
|
||||||
ha_quality_scale: internal
|
ha_quality_scale: internal
|
||||||
|
ha_config_flow: true
|
||||||
ha_domain: tod
|
ha_domain: tod
|
||||||
ha_platforms:
|
ha_platforms:
|
||||||
- binary_sensor
|
- binary_sensor
|
||||||
---
|
---
|
||||||
|
|
||||||
The `tod` platform supports binary sensors which get their values by checking if the current time is within defined time ranges.
|
The Times of the Day integration provides a binary sensor that gets its values by checking if the current time is within defined time ranges.
|
||||||
|
|
||||||
|
{% include integrations/config_flow.md %}
|
||||||
|
{% configuration_basic %}
|
||||||
|
Name:
|
||||||
|
description: The name the binary sensor should have. This can be changed later.
|
||||||
|
On time:
|
||||||
|
description: The time when the sensor should turn on.
|
||||||
|
Off time:
|
||||||
|
description: The time when the sensor should turn off.
|
||||||
|
{% endconfiguration_basic %}
|
||||||
|
|
||||||
|
## YAML Configuration
|
||||||
|
|
||||||
|
Alternatlively, this integration can be configured and set up manually via YAML instead. This has some additional functionality over the UI version.
|
||||||
|
|
||||||
The time ranges can be provided as absolute local time or using the `sunrise` or `sunset` keyword calculated based on the sun position for location. The location must be provided in the configuration.
|
The time ranges can be provided as absolute local time or using the `sunrise` or `sunset` keyword calculated based on the sun position for location. The location must be provided in the configuration.
|
||||||
|
|
||||||
In addition for sun position based ranges, the negative or positive offset can be configured.
|
In addition for sun position based ranges, the negative or positive offset can be configured.
|
||||||
|
|
||||||
## Configuration
|
To enable the Times of Day binary sensor in your installation, add the
|
||||||
|
following to your `configuration.yaml` file:
|
||||||
Here is an example of adding a sensor to the `configuration.yaml` file:
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
|
Loading…
x
Reference in New Issue
Block a user