mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-02-28 03:41:57 +01:00
Add time.has_time documentation (#782)
This commit is contained in:
parent
80c1fcea25
commit
a8bbf75b6d
@ -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
|
||||
--------
|
||||
|
@ -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>`
|
||||
|
Loading…
Reference in New Issue
Block a user