Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
q
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jens Nolte
q
Commits
fea323a7
Commit
fea323a7
authored
2 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Add "steve" to living room light presets
parent
ab927cc6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Q/Home.hs
+26
-8
26 additions, 8 deletions
src/Q/Home.hs
with
26 additions
and
8 deletions
src/Q/Home.hs
+
26
−
8
View file @
fea323a7
...
...
@@ -50,6 +50,7 @@ homeDaemon mqttUri = do
liftIO
$
subscribeIkeaDimmer
mqtt
"switch_kitchen"
(
kitchenDimmer
mqtt
)
liftIO
$
subscribeIkeaDimmer
mqtt
"switch_bedroom_1"
(
bedroomDimmer
mqtt
)
liftIO
$
subscribeIkeaDimmer
mqtt
"switch_bedroom_2"
(
bedroomDimmer
mqtt
)
liftIO
$
subscribeIkeaDimmer
mqtt
"switch_bedroom_3"
(
bedroomDimmer
mqtt
)
roomHallway
<-
liftIO
$
newRoomController
(
hallway
mqtt
)
liftIO
$
subscribeIkeaDimmer
mqtt
"switch_hallway"
(
dimmerHandlerForRoom
roomHallway
)
...
...
@@ -197,21 +198,35 @@ livingRoom mqtt = roomDefinition { lightBright, lightColorful, lightMood, lightO
lightBright
=
do
setHueWhite
mqtt
livingRoomHue
triangle01
mqtt
"warm_white"
"0.5"
steve
mqtt
"worklight"
lightColorful
=
[
colorfulA
mqtt
,
colorfulB
mqtt
,
setHueRainbow
mqtt
livingRoomHue
rainbow
mqtt
]
where
colorfulA
mqtt
=
do
setHueOrange
mqtt
livingRoomHue
triangle01
mqtt
"warm"
"0.3"
steve
mqtt
"off"
colorfulB
mqtt
=
do
setHueOrange
mqtt
livingRoomHue
triangle01
mqtt
"peachy"
"0.2"
steve
mqtt
"k8"
rainbow
mqtt
=
do
setHueRainbow
mqtt
livingRoomHue
triangle01
mqtt
"rainbow"
"0.3"
steve
mqtt
"rgb"
lightMood
=
[
do
setHueDimOrange
mqtt
livingRoomHue
triangle01
mqtt
"cozy"
"0.1"
steve
mqtt
"steve"
]
colorfulA
mqtt
=
do
setHueOrange
mqtt
livingRoomHue
triangle01
mqtt
"warm"
"0.3"
colorfulB
mqtt
=
do
setHueOrange
mqtt
livingRoomHue
triangle01
mqtt
"peachy"
"0.2"
lightMood
=
[
setHueDimOrange
mqtt
livingRoomHue
]
lightOff
=
do
setHueState
mqtt
livingRoomHue
False
triangle01
mqtt
"off"
"0.3"
steve
mqtt
"off"
switchTasmota
::
Mqtt
->
Text
->
Bool
->
IO
()
switchTasmota
Mqtt
{
mqttClient
}
name
value
=
...
...
@@ -244,5 +259,8 @@ triangle01 mqtt@Mqtt{mqttClient} animation brightness = do
qthingAnimation
mqtt
"triangle01"
animation
publish
mqttClient
(
mconcat
[
"device/triangle01/update/brightness"
])
brightness
False
steve
::
Mqtt
->
BSL
.
ByteString
->
IO
()
steve
mqtt
@
Mqtt
{
mqttClient
}
animation
=
qthingAnimation
mqtt
"kitchen"
animation
stoveLight
::
Mqtt
->
Bool
->
IO
()
stoveLight
mqtt
=
setSwitchState
mqtt
"light_stove"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment