mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 16:56:50 +00:00
Minimizing of the configuration sample (#1009)
This commit is contained in:
parent
de7c1d5ac9
commit
a664249de9
@ -14,24 +14,24 @@ ha_release: pre 0.7
|
||||
---
|
||||
|
||||
|
||||
The time and date (`time_date`) platform simple displays the time in various formats, the date, or both.
|
||||
The time and date (`time_date`) sensor platform simple displays the time in various formats, the date, or both.
|
||||
|
||||
To enable this sensor in your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
platform: time_date
|
||||
display_options:
|
||||
- 'time'
|
||||
- 'date'
|
||||
- 'date_time'
|
||||
- 'time_date'
|
||||
- 'time_utc'
|
||||
- 'beat'
|
||||
- platform: time_date
|
||||
display_options:
|
||||
- 'time'
|
||||
- 'date'
|
||||
- 'date_time'
|
||||
- 'time_date'
|
||||
- 'time_utc'
|
||||
- 'beat'
|
||||
```
|
||||
|
||||
The types *date_time* and *time_date* shows the date and the time. The other types just the time or the date. *beat* shows the [Swatch Internet Time](http://www.swatch.com/en_us/internet-time).
|
||||
- **display_options** array (*Required*): The option to display. The types *date_time* and *time_date* shows the date and the time. The other types just the time or the date. *beat* shows the [Swatch Internet Time](http://www.swatch.com/en_us/internet-time).
|
||||
|
||||
<p class='img'>
|
||||
<img src='{{site_root}}/images/screenshots/time_date.png' />
|
||||
|
@ -21,15 +21,14 @@ To enable this sensor in your installation, add the following to your `configura
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
platform: worldclock
|
||||
time_zone: America/New_York
|
||||
name: New York
|
||||
- platform: worldclock
|
||||
time_zone: America/New_York
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **time_zone** (*Required*): The resource or endpoint that contains the value.
|
||||
- **name** (*Optional*): The name of the sensor, eg. the city.
|
||||
- **name** (*Optional*): The name of the sensor, eg. the city. Defaults to 'Worldclock Sensor'.
|
||||
|
||||
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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user