diff --git a/components/alarm_control_panel/template.rst b/components/alarm_control_panel/template.rst index 9a9d3bc77..601c63936 100644 --- a/components/alarm_control_panel/template.rst +++ b/components/alarm_control_panel/template.rst @@ -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 diff --git a/components/display/index.rst b/components/display/index.rst index d81b09a58..87e907be8 100644 --- a/components/display/index.rst +++ b/components/display/index.rst @@ -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 `_ 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 `_ + 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`` diff --git a/components/max6956.rst b/components/max6956.rst index 968ee0dee..7e2871908 100644 --- a/components/max6956.rst +++ b/components/max6956.rst @@ -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. diff --git a/components/sensor/tmp1075.rst b/components/sensor/tmp1075.rst index 49a051e1f..d44c482df 100644 --- a/components/sensor/tmp1075.rst +++ b/components/sensor/tmp1075.rst @@ -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). diff --git a/components/speaker/index.rst b/components/speaker/index.rst index 85f110c3c..e4bbd5aa3 100644 --- a/components/speaker/index.rst +++ b/components/speaker/index.rst @@ -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: diff --git a/schema_doc.py b/schema_doc.py index 9607ff415..8bd1feb04 100644 --- a/schema_doc.py +++ b/schema_doc.py @@ -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)