You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_integrations/casper_glow.markdown
+92Lines changed: 92 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,98 @@ The **Casper Glow** {% term integration %} provides the following entities.
82
82
-**Dimming time**
83
83
-**Description**: Configures how long the dimming sequence lasts before the light turns off. You can choose between 15, 30, 45, 60, or 90 minutes. The new dimming time takes effect the next time the light is turned on.
84
84
85
+
## Examples
86
+
87
+
### Bedtime routine
88
+
89
+
Start a dimming sequence at a set time each night. This blueprint lets you pick your bedtime and how long the light takes to dim, so your Glow is ready when you are.
90
+
91
+
{% my blueprint_import badge blueprint_url="https://www.home-assistant.io/blueprints/integrations/casper_glow_bedtime_routine.yaml" %}
92
+
93
+
{% details "Example YAML" %}
94
+
{% raw %}
95
+
```yaml
96
+
triggers:
97
+
- trigger: time
98
+
at: "22:00:00"
99
+
actions:
100
+
- action: select.select_option
101
+
target:
102
+
entity_id: select.jar_dimming_time
103
+
data:
104
+
option: "30"
105
+
- action: light.turn_on
106
+
target:
107
+
entity_id: light.jar
108
+
```
109
+
{% endraw %}
110
+
{% enddetails %}
111
+
112
+
### Pause on motion
113
+
114
+
Keep the light from dimming while you're still up. This blueprint pauses the dimming sequence whenever motion is detected, so the light holds its brightness until you settle in.
115
+
116
+
{% my blueprint_import badge blueprint_url="https://www.home-assistant.io/blueprints/integrations/casper_glow_pause_on_motion.yaml" %}
117
+
118
+
{% details "Example YAML" %}
119
+
{% raw %}
120
+
```yaml
121
+
triggers:
122
+
- trigger: state
123
+
entity_id: binary_sensor.bedroom_motion
124
+
to: "on"
125
+
conditions:
126
+
- condition: state
127
+
entity_id: light.jar
128
+
state: "on"
129
+
actions:
130
+
- action: casper_glow.pause
131
+
target:
132
+
entity_id: light.jar
133
+
```
134
+
{% endraw %}
135
+
{% enddetails %}
136
+
137
+
### Turn on and hold at nightlight level
138
+
139
+
Turn on the Glow and let it dim down to a soft nightlight, then hold it there. This blueprint starts the dimming sequence and automatically pauses it when a set number of minutes remain, leaving a gentle glow in the room through the night.
140
+
141
+
{% my blueprint_import badge blueprint_url="https://www.home-assistant.io/blueprints/integrations/casper_glow_turn_on_pause_nightlight.yaml" %}
142
+
143
+
{% details "Example YAML" %}
144
+
{% raw %}
145
+
```yaml
146
+
triggers:
147
+
- trigger: time
148
+
at: "22:00:00"
149
+
actions:
150
+
- action: select.select_option
151
+
target:
152
+
entity_id: select.jar_dimming_time
153
+
data:
154
+
option: "30"
155
+
- action: light.turn_on
156
+
target:
157
+
entity_id: light.jar
158
+
- wait_for_trigger:
159
+
- trigger: template
160
+
value_template: >-
161
+
{% set end = states('sensor.jar_dimming_end_time') | as_datetime %}
The **Casper Glow** {% term integration %} detects the device through passive Bluetooth advertisements. All state updates are retrieved by actively {% term polling %} the device every 30 seconds — for example, to detect changes made directly on the light or through the Casper app.
name: "Turn on Casper Glow and pause at nightlight level"
3
+
description: "Turns on the Casper Glow at a set time, then pauses the dimming sequence when a specified number of minutes remain, holding the light at a dim nightlight level. Requires the Dimming End Time sensor to be enabled."
4
+
domain: automation
5
+
input:
6
+
bedtime:
7
+
name: Turn-on time
8
+
selector:
9
+
time:
10
+
glow_device:
11
+
name: Casper Glow
12
+
selector:
13
+
device:
14
+
filter:
15
+
- integration: casper_glow
16
+
dimming_minutes:
17
+
name: Dimming duration
18
+
default: "15"
19
+
selector:
20
+
select:
21
+
options:
22
+
- "15"
23
+
- "30"
24
+
- "45"
25
+
- "60"
26
+
- "90"
27
+
pause_at_remaining:
28
+
name: Pause when this many minutes remain
29
+
default: 10
30
+
selector:
31
+
number:
32
+
min: 1
33
+
max: 89
34
+
unit_of_measurement: min
35
+
mode: restart
36
+
variables:
37
+
glow_device: !input glow_device
38
+
dimming_minutes: !input dimming_minutes
39
+
pause_at_remaining: !input pause_at_remaining
40
+
light_entity: >
41
+
{{ device_entities(glow_device) | select('match', 'light\\.') | first }}
42
+
select_entity: >
43
+
{{ device_entities(glow_device) | select('match', 'select\\.') | first }}
44
+
pause_button: >
45
+
{{ device_entities(glow_device)
46
+
| select('match', 'button\\.')
47
+
| select('search', 'pause')
48
+
| first }}
49
+
sensor_entity: >
50
+
{{ device_entities(glow_device)
51
+
| select('match', 'sensor\\.')
52
+
| select('search', 'dimming_end_time')
53
+
| first }}
54
+
triggers:
55
+
- trigger: time
56
+
at: !input bedtime
57
+
actions:
58
+
- action: select.select_option
59
+
target:
60
+
entity_id: "{{ select_entity }}"
61
+
data:
62
+
option: !input dimming_minutes
63
+
- action: light.turn_on
64
+
target:
65
+
entity_id: "{{ light_entity }}"
66
+
- wait_for_trigger:
67
+
- trigger: template
68
+
value_template: >-
69
+
{% set end = states(sensor_entity) | as_datetime %}
0 commit comments