Update time.rst to add GPS as source (#375)

* Update time.rst to add GPS as source

Just saw that GPS was missing in the time documentation as a time source (the GPS component documentation redirect to the time page for configuration details)

* travis
This commit is contained in:
mbo18 2019-10-22 22:02:12 +02:00 committed by Otto Winter
parent 49104f0d4e
commit bba6e904e1

View File

@ -6,11 +6,11 @@ Time
.. seo:: .. seo::
:description: Instructions for setting up real time clock sources in ESPHome like network based time. :description: Instructions for setting up real time clock sources in ESPHome like network based time.
:image: clock-outline.png :image: clock-outline.png
:keywords: NTP, SNTP, RTC :keywords: GPS, NTP, RTC, SNTP
The ``time`` component allows you to set up real time clock time sources for ESPHome. The ``time`` component allows you to set up real time clock time sources for ESPHome.
You can then get the current time in :ref:`lambdas <config-lambda>`. You can then get the current time in :ref:`lambdas <config-lambda>`.
Currently only sntp (internet-based) and homeassistant time sources are supported. Currently only sntp (internet-based), homeassistant time and GPS sources are supported.
Home Assistant Time Source Home Assistant Time Source
-------------------------- --------------------------
@ -61,6 +61,29 @@ Configuration variables:
- **on_time** (*Optional*, :ref:`Automation <automation>`): Automation to run at specific intervals using - **on_time** (*Optional*, :ref:`Automation <automation>`): Automation to run at specific intervals using
a cron-like syntax. See :ref:`time-on_time`. a cron-like syntax. See :ref:`time-on_time`.
GPS Time Source
---------------
You first need to set up the :doc:`GPS </components/gps>` component.
.. code-block:: yaml
# Example configuration entry
time:
- platform: gps
id: gps_time
Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Specify the ID of the time for use in lambdas.
- **timezone** (*Optional*, string): Manually tell ESPHome what timezone to use with `this format
<https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html>`__ (warning: the format is quite complicated)
or the simpler `TZ database name <https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>`__ in the form
<Region>/<City>. ESPHome tries to automatically infer the timezone string based on the timezone of the computer
that is running ESPHome, but this might not always be accurate.
- **on_time** (*Optional*, :ref:`Automation <automation>`): Automation to run at specific intervals using
a cron-like syntax. See :ref:`time-on_time`.
Use In Lambdas Use In Lambdas
-------------- --------------