Skip to content

Commit e29536f

Browse files
committed
Add Light Examples
1 parent c2868ee commit e29536f

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

docs/firmware/additions.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,44 @@ binary_sensor: // [!code ++] // [!code focus]
188188
# Use the previously defined new event type here // [!code ++] // [!code focus]
189189
event_type: apartment_special // [!code ++] // [!code focus]
190190
```
191+
:::
192+
193+
::: details Turn on the light when someone rings at the entrance doorbell
194+
You can turn on the light when someone ringts the entrance doorbell.
195+
```yaml
196+
<!--@include: minimal.example.yaml-->
197+
198+
binary_sensor: // [!code ++] // [!code focus]
199+
- id: !extend entrance_doorbell // [!code ++] // [!code focus]
200+
on_press: // [!code ++] // [!code focus]
201+
- tcs_intercom.send: // [!code ++] // [!code focus]
202+
command: !lambda "return id(turn_on_light_command);" // [!code ++] // [!code focus]
203+
```
204+
205+
If you would like to take care about the sun elevation you can adjust it.
206+
```yaml
207+
<!--@include: minimal.example.yaml-->
208+
209+
# Import the Home Assistant sun elevation sensor // [!code ++] // [!code focus]
210+
sensor: // [!code ++] // [!code focus]
211+
- platform: homeassistant // [!code ++] // [!code focus]
212+
id: sun_elevation // [!code ++] // [!code focus]
213+
entity_id: sun.sun // [!code ++] // [!code focus]
214+
attribute: elevation // [!code ++] // [!code focus]
215+
216+
# Extend the entrance doorbell sensor // [!code ++] // [!code focus]
217+
binary_sensor: // [!code ++] // [!code focus]
218+
- id: !extend entrance_doorbell // [!code ++] // [!code focus]
219+
on_press: // [!code ++] // [!code focus]
220+
# Sun elevation is <= 0 (dark) // [!code ++] // [!code focus]
221+
- if: // [!code ++] // [!code focus]
222+
condition: // [!code ++] // [!code focus]
223+
sensor.in_range: // [!code ++] // [!code focus]
224+
id: sun_elevation // [!code ++] // [!code focus]
225+
below: 1 // [!code ++] // [!code focus]
226+
then: // [!code ++] // [!code focus]
227+
# Turn on the light // [!code ++] // [!code focus]
228+
- tcs_intercom.send: // [!code ++] // [!code focus]
229+
command: !lambda "return id(turn_on_light_command);" // [!code ++] // [!code focus]
230+
```
191231
:::

docs/firmware/nuki-bridge-firmware.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ Your Nuki Lock is now unpaired. The pairing mode will time out after 30 seconds.
7272
- Apartment Doorbell `apartment_doorbell`
7373
- Pick up phone `pick_up_phone` <Badge type="info" text="Disabled by default" />
7474
- Hang up phone `hang_up_phone` <Badge type="info" text="Disabled by default" />
75+
- Ring To Open: Toggle `ring_to_open_toggle` <Badge type="info" text="Internal" />
76+
- Turn on light: Trigger `turn_on_light_trigger` <Badge type="info" text="Internal" />
7577
- External Button `doorman_external_button` <Badge type="info" text="Disabled by default" />
7678
- Nuki Connected `nuki_connected`
7779
- Nuki Paired `nuki_paired`

docs/firmware/stock-firmware.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ This is the minimal ESPHome configuration yaml file, make sure to change the API
5252
- Apartment Doorbell `apartment_doorbell`
5353
- Pick up phone `pick_up_phone` <Badge type="info" text="Disabled by default" />
5454
- Hang up phone `hang_up_phone` <Badge type="info" text="Disabled by default" />
55+
- Ring To Open: Toggle `ring_to_open_toggle` <Badge type="info" text="Internal" />
56+
- Turn on light: Trigger `turn_on_light_trigger` <Badge type="info" text="Internal" />
5557
- External Button `doorman_external_button` <Badge type="info" text="Disabled by default" />
5658

5759
### Switches

firmware/base.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,15 @@ binary_sensor:
483483
entity_category: DIAGNOSTIC
484484
disabled_by_default: true
485485

486+
- platform: tcs_intercom
487+
id: "turn_on_light_trigger"
488+
name: "Turn on light: Trigger"
489+
internal: true
490+
lambda: !lambda "return id(turn_on_light_command);"
491+
auto_off: 0.2s
492+
entity_category: DIAGNOSTIC
493+
disabled_by_default: true
494+
486495
- platform: gpio
487496
id: doorman_external_button
488497
name: External Button

0 commit comments

Comments
 (0)