mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Add config flow to worldclock (#33702)
This commit is contained in:
parent
c401681e3e
commit
f5de08b574
@ -9,6 +9,7 @@ ha_quality_scale: internal
|
|||||||
ha_codeowners:
|
ha_codeowners:
|
||||||
- '@fabaff'
|
- '@fabaff'
|
||||||
ha_domain: worldclock
|
ha_domain: worldclock
|
||||||
|
ha_config_flow: true
|
||||||
ha_platforms:
|
ha_platforms:
|
||||||
- sensor
|
- sensor
|
||||||
ha_integration_type: integration
|
ha_integration_type: integration
|
||||||
@ -19,37 +20,15 @@ related:
|
|||||||
|
|
||||||
The `worldclock` {% term integration %} simply displays the current time in a different time zone.
|
The `worldclock` {% term integration %} simply displays the current time in a different time zone.
|
||||||
|
|
||||||
## Configuration
|
{% include integrations/config_flow.md %}
|
||||||
|
|
||||||
To enable this {% term integration %} in your installation, add the following to your {% term "`configuration.yaml`" %} file.
|
{% configuration_basic %}
|
||||||
{% include integrations/restart_ha_after_config_inclusion.md %}
|
Timezone:
|
||||||
|
description: Select a valid timezone from the list.
|
||||||
```yaml
|
Name:
|
||||||
# Example configuration.yaml entry
|
|
||||||
sensor:
|
|
||||||
- platform: worldclock
|
|
||||||
time_zone: America/New_York
|
|
||||||
```
|
|
||||||
|
|
||||||
{% configuration %}
|
|
||||||
time_zone:
|
|
||||||
description: The resource or endpoint that contains the value.
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
description: The name of the sensor, e.g., the city.
|
description: The name of the sensor, e.g., the city.
|
||||||
required: false
|
Time format:
|
||||||
type: string
|
description: The time format, defaults to "%H:%M" which represents hour and minute.
|
||||||
default: Worldclock Sensor
|
{% endconfiguration_basic %}
|
||||||
time_format:
|
|
||||||
description: The time format.
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: "%H:%M"
|
|
||||||
{% endconfiguration %}
|
|
||||||
|
|
||||||
For valid time zones, check the **TZ** column in the [Wikipedia overview](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), or get the full list from the [pytz](https://pypi.python.org/pypi/pytz) module.
|
For valid time zones, check the **TZ** column in the [Wikipedia overview](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
||||||
|
|
||||||
```shell
|
|
||||||
python3 -c "import pytz;print(pytz.all_timezones)"
|
|
||||||
```
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user