Add time.has_time documentation (#782)

This commit is contained in:
Ash McKenzie 2020-10-06 11:55:53 +11:00 committed by GitHub
parent 80c1fcea25
commit a8bbf75b6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -334,6 +334,21 @@ In the ``seconds:``, ``minutes:``, ... fields you can use the following operator
then:
- switch.toggle: my_switch
.. _time-has_time_condition:
``time.has_time`` Condition
----------------------------
This :ref:`Condition <config-condition>` checks if time has been set and is valid.
.. code-block:: yaml
on_...:
if:
condition:
time.has_time:
then:
- logger.log: Time has been set and is valid!
See Also
--------

View File

@ -387,6 +387,7 @@ All Conditions
- :ref:`sensor.in_range <sensor-in_range_condition>`
- :ref:`wifi.connected <wifi-connected_condition>` / :ref:`api.connected <api-connected_condition>`
/ :ref:`mqtt.connected <mqtt-connected_condition>`
- :ref:`time.has_time <time-has_time_condition>`
- :ref:`script.is_running <script-is_running_condition>`
- :ref:`sun.is_above_horizon / sun.is_below_horizon <sun-is_above_below_horizon-condition>`
- :ref:`text_sensor.state <text_sensor-state_condition>`