Skip to content

Commit 51de99b

Browse files
authored
Schema 2025 5b (#4922)
1 parent 2404e75 commit 51de99b

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

components/binary_sensor/packet_transport.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ It requires a ``packet_transport`` component to be configured.
2727
- platform: ...
2828
2929
30-
Configuration variables
31-
-----------------------
30+
Configuration variables:
31+
------------------------
3232

3333
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
3434
- **provider** (**Required**, string): The name of the provider node.

components/sensor/packet_transport.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ It requires a ``packet_transport`` component to be configured.
2020
packet_transport:
2121
- platform: ...
2222
23-
Configuration variables
24-
-----------------------
23+
Configuration variables:
24+
------------------------
2525

2626
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
2727
- **provider** (**Required**, string): The name of the provider node.

components/udp.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ UDP, like any other network protocol, does not provide a guarantee that data wil
3737
even provide any indication whether data has been successfully delivered or not.
3838

3939

40-
Write Action
41-
------------
40+
``udp.write`` Action
41+
--------------------
4242

4343
To write data to the UDP port, use the ``udp.write`` action. This action takes a single argument, the data to write to the UDP port.
4444

schema_doc.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ def doctree_resolved(app, doctree, docname):
150150
"components/output/index": {
151151
"Base Output Configuration": "output.schemas.FLOAT_OUTPUT_SCHEMA",
152152
},
153+
"components/packet_transport/index": {
154+
"Packet Transport Component": "packet_transport.schemas.TRANSPORT_SCHEMA",
155+
},
153156
"components/remote_transmitter": {
154157
"Remote Transmitter Actions": "remote_base.schemas.BASE_REMOTE_TRANSMITTER_SCHEMA",
155158
},
@@ -760,17 +763,19 @@ def depart_title(self, node):
760763
self.previous_title_text = node.astext()
761764
self.title_id = node.parent["ids"][0]
762765

763-
def find_props_previous_title(self):
766+
def find_props_previous_title(self, fail_silently=False):
764767
comp = self.json_component or self.json_platform_component
765768
if comp:
766-
props = self.find_props(comp)
769+
props = self.find_props(comp, fail_silently)
767770

768771
if self.previous_title_text in props:
769772
prop = props[self.previous_title_text]
770773
if prop:
771-
self.props = self.find_props(prop)
774+
self.props = self.find_props(prop, fail_silently)
772775
else:
773776
# return fake dict so better errors are printed
777+
if fail_silently:
778+
return # do not lose original props
774779
self.props = {"__": "none"}
775780

776781
def visit_Text(self, node):
@@ -836,7 +841,7 @@ def visit_list_item(self, node):
836841
self.filled_props = True
837842
self.current_prop, found = self.update_prop(node, self.props)
838843
if self.current_prop and not found:
839-
self.find_props_previous_title()
844+
self.find_props_previous_title(True)
840845
self.current_prop, found = self.update_prop(node, self.props)
841846
if self.current_prop and not found:
842847
logger.info(

0 commit comments

Comments
 (0)