mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-05 08:44:24 +00:00
Refactor modules - use folders, add climate
This commit is contained in:
@@ -0,0 +1,61 @@
|
|||||||
|
|
||||||
|
automation:
|
||||||
|
- alias: Lighting · Turn on ceiling lights after sunset
|
||||||
|
trigger:
|
||||||
|
platform: sun
|
||||||
|
event: sunset
|
||||||
|
offset: "-01:00:00"
|
||||||
|
condition:
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.georgi_home
|
||||||
|
state: "on"
|
||||||
|
action:
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id: light.ceiling_lights
|
||||||
|
|
||||||
|
- alias: Lighting · Turn off all lights after sunrise
|
||||||
|
trigger:
|
||||||
|
platform: sun
|
||||||
|
event: sunrise
|
||||||
|
offset: "+00:00:00"
|
||||||
|
action:
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id: light.all_lights
|
||||||
|
|
||||||
|
- alias: Lighting · Master bedroom · Toggle main lights on bedisde switch single click"
|
||||||
|
trigger:
|
||||||
|
platform: event
|
||||||
|
event_type: zha_event
|
||||||
|
event_data:
|
||||||
|
device_ieee: !secret master_bedroom_bedside_switch_ieee
|
||||||
|
command: single
|
||||||
|
action:
|
||||||
|
- service: light.toggle
|
||||||
|
entity_id: light.master_bedroom_main_lights
|
||||||
|
|
||||||
|
- alias: Lighting · Living room · Turn all lights on on Magic Cube flip 90
|
||||||
|
trigger:
|
||||||
|
platform: event
|
||||||
|
event_type: zha_event
|
||||||
|
event_data:
|
||||||
|
device_ieee: !secret magic_cube_ieee
|
||||||
|
command: flip
|
||||||
|
args:
|
||||||
|
flip_degrees: 90
|
||||||
|
action:
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id: light.living_room_all_lights
|
||||||
|
|
||||||
|
- alias: Lighting · Living room · Turn all lights off on Magic Cube flip 180
|
||||||
|
trigger:
|
||||||
|
platform: event
|
||||||
|
event_type: zha_event
|
||||||
|
event_data:
|
||||||
|
device_ieee: !secret magic_cube_ieee
|
||||||
|
command: flip
|
||||||
|
args:
|
||||||
|
flip_degrees: 180
|
||||||
|
action:
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id: light.living_room_all_lights
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# https://www.home-assistant.io/integrations/yeelight
|
||||||
|
yeelight:
|
||||||
|
devices:
|
||||||
|
!secret yeelight_bedside_ip:
|
||||||
|
name: Bedside light
|
||||||
|
|
||||||
|
# https://www.home-assistant.io/integrations/tuya
|
||||||
|
tuya:
|
||||||
|
username: !secret tuya_username
|
||||||
|
password: !secret tuya_password
|
||||||
|
country_code: bg
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
light:
|
||||||
|
- platform: group
|
||||||
|
name: Living room main lights
|
||||||
|
entities:
|
||||||
|
- light.light_lohas_1
|
||||||
|
- light.light_lohas_2
|
||||||
|
- light.light_le_9
|
||||||
|
- light.light_le_10
|
||||||
|
|
||||||
|
- platform: group
|
||||||
|
name: Living room all lights
|
||||||
|
entities:
|
||||||
|
- light.living_room_main_lights
|
||||||
|
- light.pc
|
||||||
|
|
||||||
|
- platform: group
|
||||||
|
name: Master bedroom main lights
|
||||||
|
entities:
|
||||||
|
- light.light_le_1
|
||||||
|
- light.light_le_2
|
||||||
|
- light.light_le_3
|
||||||
|
- light.light_le_4
|
||||||
|
|
||||||
|
- platform: group
|
||||||
|
name: Master bedroom all lights
|
||||||
|
entities:
|
||||||
|
- light.master_bedroom_main_lights
|
||||||
|
- light.bedside_light
|
||||||
|
|
||||||
|
- platform: group
|
||||||
|
name: Kitchen main lights
|
||||||
|
entities:
|
||||||
|
- light.light_le_11
|
||||||
|
- light.light_le_12
|
||||||
|
- light.light_orbecco_1
|
||||||
|
|
||||||
|
- platform: group
|
||||||
|
name: Hallway entrance lights
|
||||||
|
entities:
|
||||||
|
- light.light_le_5
|
||||||
|
- light.light_le_6
|
||||||
|
|
||||||
|
- platform: group
|
||||||
|
name: Hallway main lights
|
||||||
|
entities:
|
||||||
|
- light.light_le_7
|
||||||
|
- light.light_le_8
|
||||||
|
|
||||||
|
- platform: group
|
||||||
|
name: Hallway all lights
|
||||||
|
entities:
|
||||||
|
- light.hallway_entrance_lights
|
||||||
|
- light.hallway_main_lights
|
||||||
|
|
||||||
|
- platform: group
|
||||||
|
name: Ceiling lights
|
||||||
|
entities:
|
||||||
|
- light.living_room_all_lights
|
||||||
|
- light.master_bedroom_main_lights
|
||||||
|
- light.kitchen_main_lights
|
||||||
|
- light.hallway_all_lights
|
||||||
|
|
||||||
|
- platform: group
|
||||||
|
name: All lights
|
||||||
|
entities:
|
||||||
|
- light.living_room_all_lights
|
||||||
|
- light.master_bedroom_all_lights
|
||||||
|
- light.kitchen_main_lights
|
||||||
|
- light.hallway_all_lights
|
||||||
@@ -1,18 +1,3 @@
|
|||||||
# https://www.home-assistant.io/integrations/light
|
|
||||||
# https://www.home-assistant.io/integrations/light.group
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/yeelight
|
|
||||||
yeelight:
|
|
||||||
devices:
|
|
||||||
!secret yeelight_bedside_ip:
|
|
||||||
name: Bedside light
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/tuya
|
|
||||||
tuya:
|
|
||||||
username: !secret tuya_username
|
|
||||||
password: !secret tuya_password
|
|
||||||
country_code: bg
|
|
||||||
|
|
||||||
light:
|
light:
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "PC"
|
name: "PC"
|
||||||
@@ -179,75 +164,6 @@ light:
|
|||||||
qos: 1
|
qos: 1
|
||||||
retain: false
|
retain: false
|
||||||
|
|
||||||
- platform: group
|
|
||||||
name: Living room main lights
|
|
||||||
entities:
|
|
||||||
- light.light_lohas_1
|
|
||||||
- light.light_lohas_2
|
|
||||||
- light.light_le_9
|
|
||||||
- light.light_le_10
|
|
||||||
|
|
||||||
- platform: group
|
|
||||||
name: Living room all lights
|
|
||||||
entities:
|
|
||||||
- light.living_room_main_lights
|
|
||||||
- light.pc
|
|
||||||
|
|
||||||
- platform: group
|
|
||||||
name: Master bedroom main lights
|
|
||||||
entities:
|
|
||||||
- light.light_le_1
|
|
||||||
- light.light_le_2
|
|
||||||
- light.light_le_3
|
|
||||||
- light.light_le_4
|
|
||||||
|
|
||||||
- platform: group
|
|
||||||
name: Master bedroom all lights
|
|
||||||
entities:
|
|
||||||
- light.master_bedroom_main_lights
|
|
||||||
- light.bedside_light
|
|
||||||
|
|
||||||
- platform: group
|
|
||||||
name: Kitchen main lights
|
|
||||||
entities:
|
|
||||||
- light.light_le_11
|
|
||||||
- light.light_le_12
|
|
||||||
- light.light_orbecco_1
|
|
||||||
|
|
||||||
- platform: group
|
|
||||||
name: Hallway entrance lights
|
|
||||||
entities:
|
|
||||||
- light.light_le_5
|
|
||||||
- light.light_le_6
|
|
||||||
|
|
||||||
- platform: group
|
|
||||||
name: Hallway main lights
|
|
||||||
entities:
|
|
||||||
- light.light_le_7
|
|
||||||
- light.light_le_8
|
|
||||||
|
|
||||||
- platform: group
|
|
||||||
name: Hallway all lights
|
|
||||||
entities:
|
|
||||||
- light.hallway_entrance_lights
|
|
||||||
- light.hallway_main_lights
|
|
||||||
|
|
||||||
- platform: group
|
|
||||||
name: Ceiling lights
|
|
||||||
entities:
|
|
||||||
- light.living_room_all_lights
|
|
||||||
- light.master_bedroom_main_lights
|
|
||||||
- light.kitchen_main_lights
|
|
||||||
- light.hallway_all_lights
|
|
||||||
|
|
||||||
- platform: group
|
|
||||||
name: All lights
|
|
||||||
entities:
|
|
||||||
- light.living_room_all_lights
|
|
||||||
- light.master_bedroom_all_lights
|
|
||||||
- light.kitchen_main_lights
|
|
||||||
- light.hallway_all_lights
|
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
name: "PC light WiFi"
|
name: "PC light WiFi"
|
||||||
@@ -398,65 +314,6 @@ switch:
|
|||||||
value_template: "{{ value_json.Fade }}"
|
value_template: "{{ value_json.Fade }}"
|
||||||
|
|
||||||
automation:
|
automation:
|
||||||
- alias: Lighting · Turn on ceiling lights after sunset
|
|
||||||
trigger:
|
|
||||||
platform: sun
|
|
||||||
event: sunset
|
|
||||||
offset: "-01:00:00"
|
|
||||||
condition:
|
|
||||||
- condition: state
|
|
||||||
entity_id: binary_sensor.georgi_home
|
|
||||||
state: "on"
|
|
||||||
action:
|
|
||||||
- service: light.turn_on
|
|
||||||
entity_id: light.ceiling_lights
|
|
||||||
|
|
||||||
- alias: Lighting · Turn off all lights after sunrise
|
|
||||||
trigger:
|
|
||||||
platform: sun
|
|
||||||
event: sunrise
|
|
||||||
offset: "+00:00:00"
|
|
||||||
action:
|
|
||||||
- service: light.turn_off
|
|
||||||
entity_id: light.all_lights
|
|
||||||
|
|
||||||
- alias: Lighting · Master bedroom · Toggle main lights on bedisde switch single click"
|
|
||||||
trigger:
|
|
||||||
platform: event
|
|
||||||
event_type: zha_event
|
|
||||||
event_data:
|
|
||||||
device_ieee: !secret master_bedroom_bedside_switch_ieee
|
|
||||||
command: single
|
|
||||||
action:
|
|
||||||
- service: light.toggle
|
|
||||||
entity_id: light.master_bedroom_main_lights
|
|
||||||
|
|
||||||
- alias: Lighting · Living room · Turn all lights on on Magic Cube flip 90
|
|
||||||
trigger:
|
|
||||||
platform: event
|
|
||||||
event_type: zha_event
|
|
||||||
event_data:
|
|
||||||
device_ieee: !secret magic_cube_ieee
|
|
||||||
command: flip
|
|
||||||
args:
|
|
||||||
flip_degrees: 90
|
|
||||||
action:
|
|
||||||
- service: light.turn_on
|
|
||||||
entity_id: light.living_room_all_lights
|
|
||||||
|
|
||||||
- alias: Lighting · Living room · Turn all lights off on Magic Cube flip 180
|
|
||||||
trigger:
|
|
||||||
platform: event
|
|
||||||
event_type: zha_event
|
|
||||||
event_data:
|
|
||||||
device_ieee: !secret magic_cube_ieee
|
|
||||||
command: flip
|
|
||||||
args:
|
|
||||||
flip_degrees: 180
|
|
||||||
action:
|
|
||||||
- service: light.turn_off
|
|
||||||
entity_id: light.living_room_all_lights
|
|
||||||
|
|
||||||
- alias: Lighting · Sync Tasmota states on start-up
|
- alias: Lighting · Sync Tasmota states on start-up
|
||||||
initial_state: true
|
initial_state: true
|
||||||
trigger:
|
trigger:
|
||||||
@@ -1,3 +1,26 @@
|
|||||||
|
fastdotcom:
|
||||||
|
speedtestdotnet:
|
||||||
|
|
||||||
|
mikrotik:
|
||||||
|
- name: Mikrotik
|
||||||
|
host: !secret mikrotik_host
|
||||||
|
username: !secret mikrotik_username
|
||||||
|
password: !secret mikrotik_password
|
||||||
|
|
||||||
|
pi_hole:
|
||||||
|
- host: !secret pihole_host
|
||||||
|
api_key: !secret pihole_api_key
|
||||||
|
|
||||||
|
switch:
|
||||||
|
- platform: command_line
|
||||||
|
switches:
|
||||||
|
pihole_temp_disable:
|
||||||
|
friendly_name: "Pi-Hole pause for 5 mins"
|
||||||
|
command_on: !secret pihole_disable_5
|
||||||
|
command_off: !secret pihole_enable
|
||||||
|
command_state: !secret pihole_status
|
||||||
|
value_template: '{{ value_json.status == "disabled" }}'
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/synologydsm
|
# https://www.home-assistant.io/integrations/synologydsm
|
||||||
sensor:
|
sensor:
|
||||||
- platform: synologydsm
|
- platform: synologydsm
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
fastdotcom:
|
|
||||||
speedtestdotnet:
|
|
||||||
|
|
||||||
mikrotik:
|
|
||||||
- name: Mikrotik
|
|
||||||
host: !secret mikrotik_host
|
|
||||||
username: !secret mikrotik_username
|
|
||||||
password: !secret mikrotik_password
|
|
||||||
|
|
||||||
pi_hole:
|
|
||||||
- host: !secret pihole_host
|
|
||||||
api_key: !secret pihole_api_key
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: command_line
|
|
||||||
switches:
|
|
||||||
pihole_temp_disable:
|
|
||||||
friendly_name: "Pi-Hole pause for 5 mins"
|
|
||||||
command_on: !secret pihole_disable_5
|
|
||||||
command_off: !secret pihole_enable
|
|
||||||
command_state: !secret pihole_status
|
|
||||||
value_template: '{{ value_json.status == "disabled" }}'
|
|
||||||
Reference in New Issue
Block a user