Skip to content

Commit

Permalink
blinds - add more scenes
Browse files Browse the repository at this point in the history
  • Loading branch information
ph4r05 committed Aug 11, 2024
1 parent 16d414b commit 4f1b7db
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
20 changes: 19 additions & 1 deletion ph4ha/apps/blinds.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Blinds(hass.Hass):
BLIND_BEDROOM = "Bedroom"
BLIND_STUDY = "Study"
BLIND_SKLAD = "Sklad"
OPEN_HALF = 1
OPEN_HALF = 0.9

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Expand Down Expand Up @@ -84,6 +84,15 @@ def scene_activated(self, event_name, data, kwargs):
elif scene_id == "scene.blinds_morning":
self.log("Scene: blinds_morning")
self.blinds_morning()
elif scene_id == "scene.blinds_living_down_close":
self.log("Scene: blinds_living_down_close")
self.blinds_living_down_close()
elif scene_id == "scene.blinds_living_down_open":
self.log("Scene: blinds_living_down_open")
self.blinds_living_down_open()
elif scene_id == "scene.blinds_living_down_privacy":
self.log("Scene: blinds_living_down_privacy")
self.blinds_living_down_privacy()

def handle_vent(self):
self.log("Vent started")
Expand All @@ -100,6 +109,15 @@ def blinds_living_morning_hot(self):
def blinds_living_privacy(self):
self.blinds_pos_tilt(self.BLIND_LIV_BIG, 30, 0.1)

def blinds_living_down_close(self):
self.blinds_pos_tilt(self.BLIND_LIV_BIG, 0, 0)

def blinds_living_down_open(self):
self.blinds_pos_tilt(self.BLIND_LIV_BIG, 0, self.OPEN_HALF)

def blinds_living_down_privacy(self):
self.blinds_pos_tilt(self.BLIND_LIV_BIG, 0, 0.7)

def blinds_all_up(self):
self.blinds_pos_tilt(self.BLIND_LIV_BIG, 100, 0)
self.blinds_pos_tilt(self.BLIND_LIV_DOOR, 100, 0)
Expand Down
15 changes: 15 additions & 0 deletions ph4ha/config-ha/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,18 @@ scene:
entities: { }
icon: mdi:blinds
metadata: { }
- id: 'scene-living-down-open'
name: Blinds Living Down Open
entities: { }
icon: mdi:blinds
metadata: { }
- id: 'scene-living-down-close'
name: Blinds Living Down Close
entities: { }
icon: mdi:blinds
metadata: { }
- id: 'scene-living-down-privacy'
name: Blinds Living Down Privacy
entities: { }
icon: mdi:blinds
metadata: { }

0 comments on commit 4f1b7db

Please sign in to comment.