Skip to content

Commit

Permalink
New blinds
Browse files Browse the repository at this point in the history
  • Loading branch information
aneisch committed Nov 28, 2023
1 parent 106f5cc commit 41d076c
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 47 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,25 @@ Also using Grafana/Influx for graphing, both running in Docker containers on NUC
Description | value
-- | --
Lines of ESPHome YAML | 2691
Lines of Home Assistant YAML | 8257
Lines of Home Assistant YAML | 8325
[Integrations](https://www.home-assistant.io/integrations/) in use | 51
Zigbee devices in [`zha`](https://www.home-assistant.io/integrations/zha/) | 26
Z-Wave devices in [`zwave_js`](https://www.home-assistant.io/integrations/zwave_js/) | 37

Description | value
-- | --
Entities in the [`alarm_control_panel`](https://www.home-assistant.io/components/alarm_control_panel) domain | 1
Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 112
Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 113
Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 134
Entities in the [`button`](https://www.home-assistant.io/components/button) domain | 12
Entities in the [`camera`](https://www.home-assistant.io/components/camera) domain | 18
Entities in the [`climate`](https://www.home-assistant.io/components/climate) domain | 1
Entities in the [`counter`](https://www.home-assistant.io/components/counter) domain | 1
Entities in the [`cover`](https://www.home-assistant.io/components/cover) domain | 8
Entities in the [`cover`](https://www.home-assistant.io/components/cover) domain | 12
Entities in the [`device_tracker`](https://www.home-assistant.io/components/device_tracker) domain | 4
Entities in the [`event`](https://www.home-assistant.io/components/event) domain | 50
Entities in the [`fan`](https://www.home-assistant.io/components/fan) domain | 3
Entities in the [`group`](https://www.home-assistant.io/components/group) domain | 16
Entities in the [`group`](https://www.home-assistant.io/components/group) domain | 18
Entities in the [`input_boolean`](https://www.home-assistant.io/components/input_boolean) domain | 27
Entities in the [`input_datetime`](https://www.home-assistant.io/components/input_datetime) domain | 34
Entities in the [`input_number`](https://www.home-assistant.io/components/input_number) domain | 4
Expand All @@ -88,9 +88,9 @@ Entities in the [`person`](https://www.home-assistant.io/components/person) doma
Entities in the [`plant`](https://www.home-assistant.io/components/plant) domain | 1
Entities in the [`remote`](https://www.home-assistant.io/components/remote) domain | 1
Entities in the [`scene`](https://www.home-assistant.io/components/scene) domain | 2
Entities in the [`script`](https://www.home-assistant.io/components/script) domain | 42
Entities in the [`script`](https://www.home-assistant.io/components/script) domain | 43
Entities in the [`select`](https://www.home-assistant.io/components/select) domain | 2
Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 379
Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 383
Entities in the [`siren`](https://www.home-assistant.io/components/siren) domain | 1
Entities in the [`sun`](https://www.home-assistant.io/components/sun) domain | 1
Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 163
Expand All @@ -100,7 +100,7 @@ Entities in the [`update`](https://www.home-assistant.io/components/update) doma
Entities in the [`vacuum`](https://www.home-assistant.io/components/vacuum) domain | 1
Entities in the [`weather`](https://www.home-assistant.io/components/weather) domain | 2
Entities in the [`zone`](https://www.home-assistant.io/components/zone) domain | 6
**Total state objects** | **1125**
**Total state objects** | **1137**
## The HACS integrations/plugins that I use:
**Appdaemon**:<br>
[aneisch/follow_me_appdaemon](https://github.com/aneisch/follow_me_appdaemon)<br>
Expand Down
2 changes: 1 addition & 1 deletion extras/Node-RED/flows.json

Large diffs are not rendered by default.

51 changes: 26 additions & 25 deletions extras/appdaemon/apps/apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ AC Automation:
cool_day: "78"
cool_night: "72"
cool_unoccupied: "82"
heat_day: "63"
heat_night: "62"
heat_day: "68"
heat_night: "64"
heat_unoccupied: "55"

Back Bedroom Zigbee Remote:
Expand Down Expand Up @@ -309,6 +309,7 @@ Doorbell Ring Light:
class: Timer
entities: light.front_door_ring_light
time_on: sunrise - 00:30:00
time_off: sunset + 00:45:00
# Off is handled by NodeRed with Porch Lights

Office Light at Night With Door:
Expand Down Expand Up @@ -429,14 +430,6 @@ Living Room Lamp Follow:
leader: light.master_bedroom_lamps
follower: light.living_room_lamps

# Candles Follow:
# module: follow_me
# class: Follow
# constrain_presence: anyone
# constrain_input_boolean: input_boolean.house_lamps_automation
# leader: light.master_bedroom_lamps
# follower: switch.ir_candles

Door Notification and Occusim Security Follow:
module: follow_me
class: Follow
Expand All @@ -460,14 +453,22 @@ TV Automation Smallgroup:
time_on: "22:00:00"
entities: automation.turn_off_speakers_when_tv_or_xbox_powers_off

Pumkin Patch Smallgroup:
module: entity_timer
constrain_days: wed
constrain_presence: anyone
class: Timer
time_off: "17:45:00"
time_on: "22:00:00"
entities: switch.ir_candles
# Candles Follow:
# module: follow_me
# class: Follow
# constrain_presence: anyone
# constrain_input_boolean: input_boolean.house_lamps_automation
# leader: light.master_bedroom_lamps
# follower: switch.ir_candles

# Pumkin Patch Smallgroup:
# module: entity_timer
# constrain_days: wed
# constrain_presence: anyone
# class: Timer
# time_off: "17:45:00"
# time_on: "22:00:00"
# entities: switch.ir_candles

Globe Lights Smallgroup:
module: entity_timer
Expand All @@ -485,18 +486,18 @@ Mac Focus Mode Follow Desk LED:
leader: light.desk_led
follower: switch.weasel_focus

VRS Docker:
module: entity_timer
class: Timer
time_on: "08:00:00"
time_off: "21:00:00"
entities: switch.docker_vrs
# VRS Docker:
# module: entity_timer
# class: Timer
# time_on: "08:00:00"
# time_off: sunset + 00:01:00
# entities: switch.docker_vrs

Code Project Docker:
module: entity_timer
class: Timer
time_on: "08:00:00"
time_off: sunset + 00:30:00
time_off: sunset
entities: switch.docker_codeproject

BVST Docker:
Expand Down
Binary file modified images/nodered_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/nodered_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
94 changes: 81 additions & 13 deletions packages/blinds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ homeassistant:
assumed_state: true
dining_room_blinds:
assumed_state: true
office_blinds:
assumed_state: true

group:
dining_room_blinds:
name: Dining Room Blinds
entities:
- cover.dining_room_blind_left
- cover.dining_room_blind_center
- cover.dining_room_blind_right
guest_bedroom_blinds:
name: Guest Bedroom Blinds
entities:
- cover.guest_bedroom_blind_left
- cover.guest_bedroom_blind_right
office_blinds:
name: Office Blinds
entities:
- cover.office_blind_left
- cover.office_blind_right

cover:
- platform: template
Expand Down Expand Up @@ -33,6 +53,33 @@ cover:
mdi:window-closed
{% endif %}
- platform: template
covers:
office_blinds:
friendly_name: "Office Blinds"
open_cover:
service: script.blinds_group
data:
modus: "open"
group: office
close_cover:
service: script.blinds_group
data:
modus: "close"
group: office
stop_cover:
service: script.blinds_group
data:
modus: "stop"
group: office
value_template: "{{is_state('sensor.office_blinds', 'open')}}"
icon_template: >-
{% if is_state('sensor.office_blinds', 'open') %}
mdi:window-open
{% else %}
mdi:window-closed
{% endif %}
dining_room_blinds:
friendly_name: "Dining Room Blinds"
open_cover:
Expand Down Expand Up @@ -75,6 +122,16 @@ sensor:
closed
{% endif %}
office_blinds:
value_template: >-
{% if is_state('cover.office_blind_left', 'open') %}
open
{% elif is_state('cover.office_blind_right', 'open') %}
open
{% else %}
closed
{% endif %}
dining_room_blinds:
value_template: >-
{% if is_state('cover.dining_room_blind_left', 'open') %}
Expand All @@ -87,20 +144,18 @@ sensor:
closed
{% endif %}
script:
blinds_group:
sequence:
- service: "cover.{{modus}}_cover"
target:
entity_id: >
{% if group == "guest_bedroom" %}
- cover.guest_bedroom_blind_left
- cover.guest_bedroom_blind_right
{{ expand('group.guest_bedroom_blinds') | map(attribute='entity_id') | list}}
{% elif group == "dining_room" %}
- cover.dining_room_blind_left
- dining_room_blind_center
- cover.dining_room_blind_right
{{ expand('group.dining_room_blinds') | map(attribute='entity_id') | list}}
{% elif group == "office" %}
{{ expand('group.office_blinds') | map(attribute='entity_id') | list}}
{% endif %}
automation:
Expand All @@ -113,26 +168,39 @@ automation:
- platform: state
entity_id: sun.sun
state: below_horizon
id: night
id: sunset
- platform: time
at: "21:00:00"
id: late
action:
- choose:
- conditions: "{{ trigger.id == 'night' }}"
alias: Close Blinds
- conditions: "{{ trigger.id == 'sunset' }}"
alias: Close Blinds at Sunset
sequence:
- service: cover.close_cover
target:
entity_id:
#- cover.office_blind_left # Christmas
- cover.office_blind_right
#- cover.office_blinds # Christmas
- cover.office_blind_right # Christmas
- cover.guest_bedroom_blinds
- cover.dining_room_blind_left
- cover.dining_room_blind_right
- conditions: "{{ trigger.id == 'late' }}"
alias: Close Blinds Late
sequence:
- service: cover.close_cover
target:
entity_id:
- cover.office_blinds
- cover.dining_room_blinds
- conditions: "{{ trigger.id == 'morning' }}"
alias: Open Blinds
sequence:
- service: cover.open_cover
target:
entity_id:
- cover.office_blind_left
- cover.office_blind_right
- cover.office_blinds
- cover.dining_room_blinds
## Only automate office auto-open for now
# Only open blinds if guest mode is OFF
# - if: "{{ states('input_boolean.guest_mode') == 'off' }}"
Expand Down
5 changes: 4 additions & 1 deletion scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ home_empty:
entity_id:
- group.master_bedroom
- group.common_areas
- switch.master_bedroom_christmas_tree # manually turn off because of goodnight script
# If before dark, turn off christmas trees in front

- if: "{{ now().hour < 16 }}"
then:
- service: switch.turn_off
Expand All @@ -36,7 +38,7 @@ home_occupied:
#- light.living_room_sconces
# Not so bright if it's late..
brightness: >
{% if now().hour <= 7 or now().hour >= 20 %}
{% if now().hour <= 7 or now().hour >= 22 %}
128
{% else %}
254
Expand All @@ -46,6 +48,7 @@ home_occupied:
entity_id:
- group.under_cabinet_lights
- group.christmas # dining, office, master tree follow 'on' via appdaemon
- switch.master_bedroom_christmas_tree # manually turn on because of goodnight script
- if: "{{ now().hour <= 7 or now().hour >= 21 }}"
then:
- service: cover.close_cover
Expand Down

0 comments on commit 41d076c

Please sign in to comment.