Compare commits
4 Commits
31a49d6b63
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| f300810b6c | |||
| 887e9fe267 | |||
| fd88f66541 | |||
| fe79a33c9c |
@@ -94,7 +94,7 @@
|
|||||||
- '505468673754923049'
|
- '505468673754923049'
|
||||||
mode: single
|
mode: single
|
||||||
- id: '1628291074276'
|
- id: '1628291074276'
|
||||||
alias: Turn Off Lights When House is Empty
|
alias: Activate Empty House Scene when house is empty
|
||||||
description: When everybody leaves, turn off the lights (switches only)
|
description: When everybody leaves, turn off the lights (switches only)
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
@@ -102,9 +102,7 @@
|
|||||||
to: 'off'
|
to: 'off'
|
||||||
condition: []
|
condition: []
|
||||||
action:
|
action:
|
||||||
- service: switch.turn_off
|
- scene: scene.empty_house
|
||||||
target:
|
|
||||||
entity_id: all
|
|
||||||
mode: single
|
mode: single
|
||||||
- id: '1628359480237'
|
- id: '1628359480237'
|
||||||
alias: Turn Off Downstairs Lights on Time Schedule
|
alias: Turn Off Downstairs Lights on Time Schedule
|
||||||
@@ -150,7 +148,7 @@
|
|||||||
action:
|
action:
|
||||||
- service: homeassistant.turn_off
|
- service: homeassistant.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: group.basement
|
entity_id: group.basement_lights
|
||||||
mode: single
|
mode: single
|
||||||
- id: '1628966608945'
|
- id: '1628966608945'
|
||||||
alias: Reactivate Basemnt footpath lights if door is propped
|
alias: Reactivate Basemnt footpath lights if door is propped
|
||||||
@@ -168,7 +166,7 @@
|
|||||||
action:
|
action:
|
||||||
- service: homeassistant.turn_on
|
- service: homeassistant.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: group.basement
|
entity_id: group.basement_lights
|
||||||
mode: single
|
mode: single
|
||||||
- id: '1629133005916'
|
- id: '1629133005916'
|
||||||
alias: Turn off lab projector when lab chromecast is off
|
alias: Turn off lab projector when lab chromecast is off
|
||||||
@@ -179,9 +177,50 @@
|
|||||||
domain: media_player
|
domain: media_player
|
||||||
entity_id: media_player.joe_s_lab
|
entity_id: media_player.joe_s_lab
|
||||||
type: turned_off
|
type: turned_off
|
||||||
|
for:
|
||||||
|
hours: 0
|
||||||
|
minutes: 0
|
||||||
|
seconds: 10
|
||||||
|
milliseconds: 0
|
||||||
condition: []
|
condition: []
|
||||||
action:
|
action:
|
||||||
- service: media_player.turn_off
|
- service: media_player.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.lab_projector
|
entity_id: media_player.lab_projector
|
||||||
mode: single
|
mode: single
|
||||||
|
- id: '1629335199149'
|
||||||
|
alias: Dim the lights when living room tv is activated
|
||||||
|
description: Enters the light mode living room cinema scene IF the lights are on.
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: media_player.samsungtv_2570afd6_0816_491c_99e1_43252512efe3
|
||||||
|
to: 'on'
|
||||||
|
condition:
|
||||||
|
- condition: device
|
||||||
|
type: is_on
|
||||||
|
device_id: f4fa8528d77b7dca7c7f5c1fe6fcf7a8
|
||||||
|
entity_id: light.living_room_lights
|
||||||
|
domain: light
|
||||||
|
action:
|
||||||
|
- scene: scene.living_room_cinema_scene
|
||||||
|
mode: single
|
||||||
|
- id: '1629567624901'
|
||||||
|
alias: Reactivate lights when Living Room TV is stopped
|
||||||
|
description: ''
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: media_player.samsungtv_2570afd6_0816_491c_99e1_43252512efe3
|
||||||
|
to: 'off'
|
||||||
|
condition:
|
||||||
|
- condition: device
|
||||||
|
type: is_on
|
||||||
|
device_id: f4fa8528d77b7dca7c7f5c1fe6fcf7a8
|
||||||
|
entity_id: light.living_room_lights
|
||||||
|
domain: light
|
||||||
|
action:
|
||||||
|
- type: turn_on
|
||||||
|
device_id: f4fa8528d77b7dca7c7f5c1fe6fcf7a8
|
||||||
|
entity_id: light.living_room_lights
|
||||||
|
domain: light
|
||||||
|
brightness_pct: 100
|
||||||
|
mode: single
|
||||||
|
|||||||
@@ -74,14 +74,11 @@ media_player:
|
|||||||
|
|
||||||
# Poe switch!
|
# Poe switch!
|
||||||
switch:
|
switch:
|
||||||
- platform: telnet
|
- platform: command_line
|
||||||
switches:
|
switches:
|
||||||
lab_camera_power:
|
lab_camera_power:
|
||||||
resource: 10.85.3.96
|
command_on: bash /config/scripts/hpe_switch.sh 2 on
|
||||||
port: 22
|
command_off: bash /config/scripts/hpe_switch.sh 2 off
|
||||||
command_on: "\n5\nconfig\ninterface 2 power"
|
|
||||||
command_off: "no interface 2 power"
|
|
||||||
timeout: 2
|
|
||||||
|
|
||||||
|
|
||||||
group: !include groups.yaml
|
group: !include groups.yaml
|
||||||
|
|||||||
10
groups.yaml
10
groups.yaml
@@ -1,6 +1,14 @@
|
|||||||
# Basement light group
|
# Basement light group
|
||||||
basement:
|
basement_lights:
|
||||||
name: Basement Lights
|
name: Basement Lights
|
||||||
entities:
|
entities:
|
||||||
- switch.shop_lights
|
- switch.shop_lights
|
||||||
- switch.shop_foyer_lights
|
- switch.shop_foyer_lights
|
||||||
|
first_floor_lights:
|
||||||
|
name: First Floor Lights
|
||||||
|
entities:
|
||||||
|
- light.living_room_lights
|
||||||
|
second_floor_lights:
|
||||||
|
name: Second Floor Lights
|
||||||
|
entities:
|
||||||
|
- switch.lab_lights
|
||||||
|
|||||||
59
scenes.yaml
59
scenes.yaml
@@ -0,0 +1,59 @@
|
|||||||
|
- id: '1629564986190'
|
||||||
|
name: Living Room Cinema Scene (Light Mode)
|
||||||
|
entities:
|
||||||
|
light.living_room_lights:
|
||||||
|
supported_color_modes:
|
||||||
|
- brightness
|
||||||
|
color_mode: brightness
|
||||||
|
brightness: 77
|
||||||
|
friendly_name: living room lights
|
||||||
|
supported_features: 32
|
||||||
|
state: 'on'
|
||||||
|
icon: mdi:theater
|
||||||
|
- id: '1629565045333'
|
||||||
|
name: Joe's Room Cinema Scene
|
||||||
|
entities:
|
||||||
|
switch.lab_lights:
|
||||||
|
friendly_name: Lab Lights
|
||||||
|
state: 'off'
|
||||||
|
icon: mdi:theater
|
||||||
|
- id: '1629566187404'
|
||||||
|
name: Empty House
|
||||||
|
entities:
|
||||||
|
group.basement_lights:
|
||||||
|
entity_id:
|
||||||
|
- switch.shop_lights
|
||||||
|
- switch.shop_foyer_lights
|
||||||
|
order: 0
|
||||||
|
friendly_name: Basement Lights
|
||||||
|
state: 'off'
|
||||||
|
group.first_floor_lights:
|
||||||
|
entity_id:
|
||||||
|
- light.living_room_lights
|
||||||
|
order: 1
|
||||||
|
friendly_name: First Floor Lights
|
||||||
|
state: 'off'
|
||||||
|
group.second_floor_lights:
|
||||||
|
entity_id:
|
||||||
|
- switch.lab_lights
|
||||||
|
order: 2
|
||||||
|
friendly_name: Second Floor Lights
|
||||||
|
state: 'off'
|
||||||
|
media_player.lab_projector:
|
||||||
|
source_list:
|
||||||
|
- RGB 1
|
||||||
|
- RGB 2
|
||||||
|
- VIDEO 1
|
||||||
|
- VIDEO 2
|
||||||
|
friendly_name: Lab Projector
|
||||||
|
supported_features: 2440
|
||||||
|
state: 'off'
|
||||||
|
media_player.samsungtv_2570afd6_0816_491c_99e1_43252512efe3:
|
||||||
|
source_list:
|
||||||
|
- TV
|
||||||
|
- HDMI
|
||||||
|
friendly_name: Living Room TV
|
||||||
|
supported_features: 20409
|
||||||
|
device_class: tv
|
||||||
|
state: 'off'
|
||||||
|
icon: mdi:warehouse
|
||||||
|
|||||||
11
scripts/hpe_switch.sh
Executable file
11
scripts/hpe_switch.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
# Written by joe
|
||||||
|
# Usage:
|
||||||
|
# ./hpe_switch.sh <interface> <state>
|
||||||
|
|
||||||
|
if [ $2 = "on" ]; then
|
||||||
|
state=""
|
||||||
|
else
|
||||||
|
state="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
{ sleep 1; echo -e ""; sleep 1; echo -e "5"; sleep 1; echo -e "config"; sleep 1; echo -e "$state interface $1 power"; sleep 1; echo -e "write memory"; sleep 1; echo -e "exit"; sleep 1; echo -e "exit"; sleep 1; echo -e "y"; } | telnet 10.85.3.96
|
||||||
Reference in New Issue
Block a user