Skip to content

Commit c914d62

Browse files
authored
Merge branch 'next' into add_lan867x
2 parents 84079d8 + 904568c commit c914d62

File tree

102 files changed

+3437
-369
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+3437
-369
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
steps:
2222
- uses: actions/[email protected]
2323
- name: Set up Python 3.8
24-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@v5
2525
with:
2626
python-version: 3.8
2727
- name: Install dependencies

Doxygen

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "ESPHome"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 2023.12.0-dev
41+
PROJECT_NUMBER = 2024.1.0-dev
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

_static/changelog-2023.12.0.png

81.1 KB
Loading

_static/custom.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ div.body p, div.body dd, div.body li, div.body blockquote {
256256
background: #212121;
257257
color: #ececec;
258258
}
259-
259+
260260
}
261261

262262
body, div.body {
@@ -281,7 +281,7 @@ div.body p, div.body dd, div.body li, div.body blockquote {
281281
color: #ececec;
282282
background-color: #212121;
283283
}
284-
284+
285285
a, a.reference, a:visited {
286286
color: #00bfff;
287287
border-bottom: 1px dotted #00bfff;
@@ -326,7 +326,7 @@ div.body p, div.body dd, div.body li, div.body blockquote {
326326
color: #e2e2e2;
327327
}
328328

329-
div.note, div.tip {
329+
div.note, div.tip, div.important {
330330
background-color: #2d2c2c;
331331
border: 1px solid #808080;
332332
}
@@ -339,4 +339,4 @@ div.body p, div.body dd, div.body li, div.body blockquote {
339339
background-color: #8e8129;
340340
}
341341

342-
}
342+
}

_static/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023.12.0-dev
1+
2024.1.0-dev

changelog/2023.11.0.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ Release 2023.11.5 - November 28
106106
- Add 'voice_assistant.connected' condition :esphomepr:`5845` by :ghuser:`jesserockz`
107107

108108

109+
Release 2023.11.6 - November 28
110+
-------------------------------
111+
112+
- Fix write_speaker without speaker in config :esphomepr:`5847` by :ghuser:`jesserockz`
113+
114+
109115
Full list of changes
110116
--------------------
111117

changelog/2023.12.0.rst

Lines changed: 347 additions & 0 deletions
Large diffs are not rendered by default.

changelog/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Changelog
22
=========
33

44
.. redirect::
5-
:url: /changelog/2023.11.0.html
5+
:url: /changelog/2023.12.0.html
66

77
.. toctree::
88
:glob:

components/alarm_control_panel/index.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ Configuration variables:
4444
when the alarm state changes to ``disarmed``. See :ref:`alarm_control_panel_on_disarmed_trigger`.
4545
- **on_cleared** (*Optional*, :ref:`Action <config-action>`): An automation to perform
4646
when the alarm clears. See :ref:`alarm_control_panel_on_cleared_trigger`.
47+
- **on_ready** (*Optional*, :ref:`Action <config-action>`): An automation to perform
48+
when the logical 'and' of all the zone sensors change state. See :ref:`alarm_control_panel_on_ready_trigger`.
49+
- **on_chime** (*Optional*, :ref:`Action <config-action>`): An automation to perform
50+
when a zone has been marked as chime in the configuration, and it changes from closed to open.
51+
See :ref:`alarm_control_panel_on_chime_trigger`.
4752

4853

4954
Automation:
@@ -184,6 +189,39 @@ This trigger is activated when the alarm changes from to disarmed.
184189
then:
185190
- logger.log: "Alarm Disarmed!"
186191
192+
.. _alarm_control_panel_on_ready_trigger:
193+
194+
``on_ready`` Trigger
195+
********************
196+
197+
This trigger is activated when the logical 'and' of all the alarm sensors change state. This is useful for implementing "alarm ready" LEDs.
198+
Once this trigger is called, you can get the ready state by calling get_all_sensors_ready() in a lambda block.
199+
200+
.. code-block:: yaml
201+
202+
alarm_control_panel:
203+
# ...
204+
on_disarmed:
205+
then:
206+
- lambda: !lambda |-
207+
ESP_LOGI("AlarmPanel", "Sensor ready change to: %s", ((id(acp1).get_all_sensors_ready()) ? (const char *) "True" : (const char *) "False"));
208+
209+
.. _alarm_control_panel_on_chime_trigger:
210+
211+
``on_chime`` Trigger
212+
********************
213+
214+
This trigger is activated when a zone sensor marked with chime:true changes from closed to open. This is useful for implementing keypad chimes when a zone
215+
opens.
216+
217+
.. code-block:: yaml
218+
219+
alarm_control_panel:
220+
# ...
221+
on_chime:
222+
then:
223+
- logger.log: "Alarm Chime!"
224+
187225
.. _alarm_control_panel_arm_away_action:
188226

189227
``arm_away`` Action
@@ -296,13 +334,15 @@ From :ref:`lambdas <config-lambda>`, you can call the following methods:
296334
- ``arm_home(code)``
297335
- ``arm_night(code)``
298336
- ``disarm(code)``
337+
- ``get_all_sensors_ready()``
299338

300339
.. code-block:: cpp
301340
302341
id(acp1).arm_away();
303342
id(acp1).arm_home();
304343
id(acp1).arm_night();
305344
id(acp1).disarm(std::string("1234"));
345+
bool all_sensors_ready = id(acp1).get_all_sensors_ready();
306346
307347
308348
Platforms

components/alarm_control_panel/template.rst

Lines changed: 78 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Configuration variables:
3636
- **input** (**Required**, string): The id of the binary sensor component
3737
- **bypass_armed_home** (*Optional*, boolean): This binary sensor will not trigger the alarm when in ``armed_home`` state.
3838
- **bypass_armed_night** (*Optional*, boolean): This binary sensor will not trigger the alarm when in ``armed_night`` state.
39+
- **trigger_mode** (*Optional*, string): Sets the trigger mode for this sensor. One of ``delayed``, ``instant``, or ``delayed_follower``. (``delayed`` is the default if not specified)
40+
- **chime** (*Optional*, boolean): When set ``true``, the chime callback will be called whenever the sensor goes from closed to open. (``false`` is the default if not specified)
3941

4042
- **restore_mode** (*Optional*, enum):
4143

@@ -46,9 +48,33 @@ Configuration variables:
4648

4749
.. note::
4850

49-
If ``binary_sensors`` is ommited then you're expected to trigger the alarm using
51+
If ``binary_sensors`` is omitted then you're expected to trigger the alarm using
5052
:ref:`alarm_control_panel_pending_action` or :ref:`alarm_control_panel_triggered_action`.
5153

54+
.. _template_alarm_control_panel-trigger_modes:
55+
56+
Trigger Modes
57+
-------------
58+
59+
Each binary sensor "zone" supports 3 trigger modes. The 3 trigger modes are:
60+
61+
- delayed
62+
- instant
63+
- delayed_follower
64+
65+
The ``delayed`` trigger mode is typically specified for exterior doors where entry is required to access an alarm keypad or other arm/disarm method. If the alarm panel is armed, and a zone set to ``delayed`` is "faulted" (i.e. the zone state is ``true``) the alarm state will change from the ``armed`` state to the ``pending`` state. During the ``pending`` state, the user has a preset time to disarm the alarm before it changes to the ``triggered`` state. This is the default trigger mode if not specified.
66+
67+
The ``instant`` trigger mode is typically used for exterior zones (e.g. windows, and glass break detectors). If the alarm control panel is armed, a fault on this type of zone will cause the alarm to go from the ``armed`` state directly to the ``triggered`` state.
68+
69+
The ``delayed_follower`` trigger mode is typically specifed for interior passive infared (PIR) or microwave sensors. One of two things happen when a ``delayed_follower`` zone is faulted:
70+
71+
1. When the alarm panel is in the armed state, a fault on a zone with ``delayed_follower`` specified will cause the alarm control panel to go directly to the ``triggered`` state.
72+
73+
2. When the alarm panel is in the pending state, a fault on a zone with ``delayed_follower`` specified will remain in the ``pending`` state.
74+
75+
The ``delayed_follower`` trigger mode offers better protection if someone enters a premises via an unprotected window or door. If there is a PIR guarding the main hallway, it will cause an instant trigger of the alarm panel as someone
76+
entered the premises in a unusual manner. Likewise, if someone enters the premises though a door set to the ``delayed`` trigger mode, and then triggers the PIR, the alarm will stay in the ``pending`` state until either they disarm the alarm, or
77+
the pending timer expires.
5278

5379
.. _template_alarm_control_panel-state_flow:
5480

@@ -63,18 +89,29 @@ State Flow:
6389

6490
3. When the alarm is tripped by a sensor state changing to ``on`` or ``alarm_control_panel_pending_action`` invoked
6591

66-
a. ``pending_time`` greater than 0 the state is ``PENDING``
67-
b. ``pending_time`` is 0 or after the ``pending_time`` delay the state is ``TRIGGERED``
92+
1. If trigger_mode is set to ``delayed``:
93+
94+
1. ``pending_time`` greater than 0 the state is ``PENDING``
95+
2. ``pending_time`` is 0 or after the ``pending_time`` delay the state is ``TRIGGERED``
96+
97+
2. If trigger_mode is set to ``instant``:
98+
99+
1. The state is set to ``TRIGGERED``
100+
101+
3. If the trigger_mode is set to ``interior_follower``:
102+
103+
1. If the current state is ``ARMED_...`` the state will be set to ``TRIGGERED``
104+
2. If the current state is ``PENDING`` then nothing will happen and it will stay in the ``PENDING`` state.
68105

69106
4. If ``trigger_time`` greater than 0 and no sensors are ``on`` after ``trigger_time`` delay
70107
the state returns to ``ARM_...``
71108

72109
.. note::
73110

74-
Although the interface supports all arming modes only ``away`` and ``home`` have been implemented for now.
111+
Although the interface supports all arming modes only ``away``, ``home`` and ``night`` have been implemented for now.
75112
``arm_...`` is for either ``arm_away`` or ``arm_home``
76-
``arming_..._time`` is for either ``arming_away_time`` or ``arming_home_time``
77-
``ARMED_...`` is for either ``ARMED_AWAY`` or ``ARMED_HOME``
113+
``arming_..._time`` is for either ``arming_away_time``, ``arming_home_time``, or ``arming_night_time``
114+
``ARMED_...`` is for either ``ARMED_AWAY``, ``ARMED_HOME``, or ``ARMED_NIGHT``
78115

79116

80117
Example:
@@ -95,8 +132,16 @@ Example:
95132
trigger_time: 5min
96133
binary_sensors:
97134
- input: zone_1
135+
chime: true
136+
trigger_mode: delayed
98137
- input: zone_2
138+
chime: true
139+
trigger_mode: delayed
140+
- input: zone_3
99141
bypass_armed_home: true
142+
trigger_mode: delayed_follower
143+
- input: zone_4
144+
trigger_mode: instant
100145
- input: ha_test
101146
on_state:
102147
then:
@@ -108,6 +153,15 @@ Example:
108153
on_cleared:
109154
then:
110155
- switch.turn_off: siren
156+
on_ready:
157+
then:
158+
- lambda: !lambda |-
159+
ESP_LOGD("TEST", "Sensor ready change to: %s",
160+
(id(acp1).get_all_sensors_ready())) ? (const char *) "True" : (const char *) "False");
161+
on_chime:
162+
then:
163+
- lambda: !lambda |-
164+
ESP_LOGD("TEST", "Zone with chime mode set opened");
111165
112166
binary_sensor:
113167
- platform: gpio
@@ -121,14 +175,30 @@ Example:
121175
- platform: gpio
122176
id: zone_2
123177
name: Zone 2
124-
device_class: motion
178+
device_class: door
125179
pin:
126180
number: D2
127181
mode: INPUT_PULLUP
128182
inverted: True
183+
- platform: gpio
184+
id: zone_3
185+
name: Zone 3
186+
device_class: motion
187+
pin:
188+
number: D3
189+
mode: INPUT_PULLUP
190+
inverted: True
191+
- platform: gpio
192+
id: zone_4
193+
name: Zone 4
194+
device_class: door
195+
pin:
196+
number: D4
197+
mode: INPUT_PULLUP
198+
inverted: True
129199
- platform: homeassistant
130200
id: ha_test
131-
name: Zone 3
201+
name: HA Test
132202
entity_id: input_boolean.test_switch
133203
134204
switch:

0 commit comments

Comments
 (0)