mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Minimizing of the configuration sample (#1009)
This commit is contained in:
parent
de7c1d5ac9
commit
a664249de9
@ -14,14 +14,14 @@ 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:
|
To enable this sensor in your installation, add the following to your `configuration.yaml` file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
sensor:
|
sensor:
|
||||||
platform: time_date
|
- platform: time_date
|
||||||
display_options:
|
display_options:
|
||||||
- 'time'
|
- 'time'
|
||||||
- 'date'
|
- 'date'
|
||||||
@ -31,7 +31,7 @@ sensor:
|
|||||||
- 'beat'
|
- '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'>
|
<p class='img'>
|
||||||
<img src='{{site_root}}/images/screenshots/time_date.png' />
|
<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
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
sensor:
|
sensor:
|
||||||
platform: worldclock
|
- platform: worldclock
|
||||||
time_zone: America/New_York
|
time_zone: America/New_York
|
||||||
name: New York
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
Configuration variables:
|
||||||
|
|
||||||
- **time_zone** (*Required*): The resource or endpoint that contains the value.
|
- **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.
|
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