Merge branch 'current' into next

This commit is contained in:
Jesse Hills 2023-06-26 09:43:15 +12:00
commit 3130234dc6
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
6 changed files with 30 additions and 14 deletions

View File

@ -26,9 +26,10 @@ Configuration variables:
- **codes** (*Optional*, list of string): A list of codes for disarming the alarm, if *requires_code_to_arm* set to true then for arming the alarm too.
- **requires_code_to_arm** (*Optional*, boolean): Code required for arming the alarm, *codes* must be provided.
- **arming_time** (*Optional*, :ref:`config-time`): The exit delay before the alarm is armed.
- **pending_time** (*Optional*, :ref:`config-time`): The entry delay before the alarm is triggered.
- **trigger_time** (*Optional*, :ref:`config-time`): The time after a triggered alarm before resetting to previous state if the sensors are cleared/off.
- **arming_away_time** (*Optional*, :ref:`config-time`): The exit delay before the alarm is armed to away mode. Defaults to ``0s``.
- **arming_home_time** (*Optional*, :ref:`config-time`): The exit delay before the alarm is armed to home mode.
- **pending_time** (*Optional*, :ref:`config-time`): The entry delay before the alarm is triggered. Defaults to ``0s``.
- **trigger_time** (*Optional*, :ref:`config-time`): The time after a triggered alarm before resetting to previous state if the sensors are cleared/off. Defaults to ``0s``.
- **binary_sensors** (*Optional*, *list*): A list of binary sensors the panel should use. Each consists of:
- **input** (**Required**, string): The id of the binary sensor component

View File

@ -672,7 +672,9 @@ Configuration variables:
- **file** (**Required**, string):
- **Local files**: The path (relative to where the .yaml file is) of the image file.
- **Material Design Icons**: Specify the `Material Design Icon <https://pictogrammers.com/library/mdi/>`_ id in the format ``mdi:icon-name``, and that icon will automatically be downloaded and added to the configuration.
- **Material Design Icons**: Specify the `Material Design Icon <https://pictogrammers.com/library/mdi/>`_
id in the format ``mdi:icon-name``, and that icon will automatically be downloaded and added to the configuration.
- **id** (**Required**, :ref:`config-id`): The ID with which you will be able to reference the image later
in your display code.
- **resize** (*Optional*, string): If set, this will resize the image to fit inside the given dimensions ``WIDTHxHEIGHT``

View File

@ -47,12 +47,13 @@ Configuration variables:
Defaults to ``false``
- **brightness_global** (*Optional*): Set the value of the current to be sink by all pins configured as led driver.
Defaults to ``0``
- **brightness_mode** (*Optional*): Define if the current to be sink will be confgured globaly or per pin configured as led driver.
- **brightness_mode** (*Optional*): Define if the current to be sink will be confgured globaly or per pin configured as led driver.
Defaults to ``global``
Binary Sensor
-------------
Binary Sensor Example
---------------------
``max6956`` pins can be use as binary sensor. Individual pullup are supported.
.. code-block:: yaml
@ -83,8 +84,9 @@ Binary Sensor
inverted: False
Switch
-------------
Switch Example
--------------
``max6956`` pins can be use as switch.
.. code-block:: yaml
@ -113,8 +115,9 @@ Switch
inverted: False
Led driver
-------------
Led driver Example
------------------
``max6956`` can control a constant-current sink to drive leds, with 16 equal steps from 1.5mA to 24mA.

View File

@ -57,6 +57,7 @@ Configuration variables:
checks the sensor. Possible values are ``27.5ms``, ``55ms``, ``110ms``, and
``220ms``. Defaults to ``27.5ms``.
- **alert** (*Optional*): Configure the alert pin behaviour.
- **function** (*Optional*, enum): Function of the alert pin, either ``comparator`` or ``interrupt``. Defaults to ``comparator``.
- **polarity** (*Optional*, enum): Polarity of the alert pin, either ``active_high`` or ``active_low``. Defaults to ``active_high``.
- **limit_low** (*Optional*, int): Lower temperature limit, in °C. Defaults to ``-128`` (the lowest possible limit value).

View File

@ -51,8 +51,8 @@ This action will start playing raw audio data from the speaker.
Configuration variables:
**id** (*Optional*, :ref:`config-id`): The speaker to control. Defaults to the only one in YAML.
**data** (*Required*, list of bytes): The raw audio data to play.
- **id** (*Optional*, :ref:`config-id`): The speaker to control. Defaults to the only one in YAML.
- **data** (**Required**, list of bytes): The raw audio data to play.
.. _speaker-stop:
@ -71,7 +71,7 @@ your configuration YAML.
Configuration variables:
**id** (*Optional*, :ref:`config-id`): The speaker to check. Defaults to the only one in YAML.
- **id** (*Optional*, :ref:`config-id`): The speaker to check. Defaults to the only one in YAML.
.. _speaker-is_playing:

View File

@ -83,6 +83,8 @@ PLATFORMS_TITLES = {
"I²C": "i2c",
"Media Player": "media_player",
"Microphone": "microphone",
"Speaker": "speaker",
"Alarm Control Panel": "alarm_control_panel",
}
CUSTOM_DOCS = {
@ -196,6 +198,9 @@ CUSTOM_DOCS = {
"components/display_menu/lcd_menu": {
"LCD Menu": "lcd_menu.schemas.CONFIG_SCHEMA",
},
"components/alarm_control_panel/index": {
"Base Alarm Control Panel Configuration": "template.alarm_control_panel.schemas.CONFIG_SCHEMA",
},
}
REQUIRED_OPTIONAL_TYPE_REGEX = r"(\(((\*\*Required\*\*)|(\*Optional\*))(,\s(.*))*)\):\s"
@ -623,6 +628,10 @@ class SchemaGeneratorVisitor(nodes.NodeVisitor):
): # props are right for typed components so far
c = self.json_component
if c:
if self.component in c:
c = c[self.component]["schemas"][
self.component.upper() + "_SCHEMA"
]
trigger_schema = self.find_props(c).get(key)
if trigger_schema is not None:
self.props = self.find_props(trigger_schema)