Add browser_mod config for kitchen. Automate based on it

This commit is contained in:
2020-04-24 23:46:13 +03:00
parent 3e8d38bb5f
commit 0d1bd2e2cf
8 changed files with 176 additions and 43 deletions
-2
View File
@@ -128,8 +128,6 @@ zeroconf:
# ─── PLUGINS ────────────────────────────────────────────────────────────────────
#
browser_mod:
spotcast:
username: !secret spotify_spotcast_username
password: !secret spotify_spotcast_password
+1
View File
@@ -38,6 +38,7 @@ views:
- sensor.bedroom_weather_temperature
- binary_sensor.bedroom_right_window_on_off_wrapper
- binary_sensor.browser_kitchen
- binary_sensor.motion_1_ias_zone
- binary_sensor.motion_2_ias_zone
@@ -107,7 +107,7 @@
- type: custom:decluttering-card
template: floorplan_state_icon
variables:
- entity: binary_sensor.motion_1_ias_zone
- entity: binary_sensor.browser_kitchen
- top: 34%
- left: 27%
- tap_action:
@@ -47,10 +47,10 @@ cards:
- type: glance
title: Sensors
entities:
- entity: binary_sensor.browser_kitchen
- entity: binary_sensor.motion_1_ias_zone
- entity: sensor.motion_1_illuminance
- entity: binary_sensor.motion_1_occupancy
- entity: sensor.motion_1_power
- type: "custom:mini-graph-card"
animate: true
points_per_hour: 1
+26 -4
View File
@@ -50,13 +50,18 @@ cards:
- automation.lighting_turn_on_ceiling_lights_after_sunset
- automation.lighting_turn_off_all_lights_after_sunrise
- automation.lighting_adjust_temperature_on_start
- automation.lighting_master_bedroom_toggle_lights_on_bedside_switch_single_click
- automation.lighting_master_bedroom_adjust_temperature_based_on_time
- type: divider
- automation.lighting_living_room_adjust_temperature_based_on_time
- automation.lighting_living_room_turn_all_lights_on_on_magic_cube_flip_90
- automation.lighting_living_room_turn_all_lights_off_on_magic_cube_flip_180
- automation.lighting_night_mode_kitchen_turn_lights_on_motion
- automation.lighting_night_mode_hallway_turn_lights_on_motion
- automation.lighting_master_bedroom_toggle_lights_on_bedside_switch_single_click
- automation.lighting_master_bedroom_adjust_temperature_based_on_time
- automation.lighting_kitchen_day_mode_motion_turn_lights_on_after_sunset
- automation.lighting_kitchen_day_mode_motion_turn_lights_off
- automation.lighting_kitchen_night_mode_motion_turn_lights_on
- automation.lighting_kitchen_night_mode_motion_turn_lights_off
- automation.lighting_hallway_night_mode_motion_turn_lights_on
- automation.lighting_hallway_night_mode_motion_turn_lights_off
- automation.lighting_sync_tasmota_states_on_start_up
- type: divider
@@ -177,6 +182,23 @@ cards:
- automation.speech_telegram_action_do_nothing
- automation.ifttt_call_service
- type: divider
# Browser mod
- type: custom:fold-entity-row
head:
type: custom:dummy-entity-row
entity: sun.sun
icon: mdi:google-chrome
name: Browser mod
tap_action: none
entities:
- automation.browser_mod_kitchen_night_brightness
- automation.browser_mod_kitchen_day_brightness
- automation.browser_mod_kitchen_home
- automation.browser_mod_kitchen_away
- type: entities
title: Batteries
show_header_toggle: false
+27
View File
@@ -1,3 +1,30 @@
automation:
- 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
#
# ─── CUSTOMIZATION ──────────────────────────────────────────────────────────────
#
+66 -35
View File
@@ -48,37 +48,49 @@ automation:
100
{% endif %}
- 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 · Night mode · Kitchen · Turn lights on motion
- alias: Lighting · Kitchen · Day mode · Motion · Turn lights on after sunset
trigger:
platform: state
entity_id: binary_sensor.motion_1_ias_zone
from: "off"
entity_id: binary_sensor.browser_kitchen
to: "on"
condition:
condition: and
conditions:
- condition: state
entity_id: input_select.house_mode
state: 'day'
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
- service: light.turn_on
entity_id: light.tuya_kitchen_all_lights
- alias: Lighting · Kitchen · Day mode · Motion · Turn lights off
trigger:
platform: state
entity_id: binary_sensor.browser_kitchen
to: "off"
for:
minutes: 30
condition:
condition: and
conditions:
- condition: state
entity_id: input_select.house_mode
state: 'day'
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
- service: light.turn_off
entity_id: light.tuya_kitchen_all_lights
- alias: Lighting · Kitchen · Night mode · Motion · Turn lights on
trigger:
platform: state
entity_id: binary_sensor.browser_kitchen
to: "on"
condition:
condition: template
@@ -88,8 +100,18 @@ automation:
entity_id: light.light_le_12
data:
brightness_pct: 13
- delay: 00:10:00
# reset brightness and turn off
- alias: Lighting · Kitchen · Night mode · Motion · Turn lights off
trigger:
platform: state
entity_id: binary_sensor.browser_kitchen
to: "off"
for:
minutes: 10
condition:
condition: template
value_template: "{{ not is_state('input_select.house_mode', 'day') }}"
action:
- service: light.turn_on
entity_id: light.light_le_12
data:
@@ -97,11 +119,10 @@ automation:
- service: light.turn_off
entity_id: light.light_le_12
- alias: Lighting · Night mode · Hallway · Turn lights on motion
- alias: Lighting · Hallway · Night mode · Motion · Turn lights on
trigger:
platform: state
entity_id: binary_sensor.motion_2_ias_zone
from: "off"
to: "on"
condition:
condition: template
@@ -113,8 +134,18 @@ automation:
- light.light_le_8
data:
brightness_pct: 13 # this is the lowest it'll go ¯\_(ツ)_/¯
- delay: 00:10:00
# reset brightness and turn off
- alias: Lighting · Hallway · Night mode · Motion · Turn lights off
trigger:
platform: state
entity_id: binary_sensor.motion_2_ias_zone
to: "off"
for:
minutes: 10
condition:
condition: template
value_template: "{{ not is_state('input_select.house_mode', 'day') }}"
action:
- service: light.turn_on
entity_id:
- light.light_le_6
+54
View File
@@ -0,0 +1,54 @@
# https://github.com/thomasloven/hass-browser_mod
browser_mod:
prefix: "browser_"
devices:
40b846ed-78c5016a:
name: browser_kitchen
automation:
- alias: Browser mod · Kitchen · Night brightness
trigger:
platform: state
entity_id: input_select.house_mode
to: "night"
action:
- service: browser_mod.no_blackout
data:
deviceID: "40b846ed-78c5016a"
brightness: 1
- alias: Browser mod · Kitchen · Day brightness
trigger:
platform: state
entity_id: input_select.house_mode
from: "night"
action:
- service: browser_mod.no_blackout
data:
deviceID: "40b846ed-78c5016a"
brightness: 255
- alias: Browser mod · Kitchen · Home
trigger:
platform: state
entity_id: input_boolean.georgi_home
to: "on"
action:
- service: browser_mod.no_blackout
data:
deviceID: "40b846ed-78c5016a"
- alias: Browser mod · Kitchen · Away
trigger:
platform: state
entity_id: input_boolean.georgi_home
to: "off"
action:
- service: browser_mod.blackout
data:
deviceID: "40b846ed-78c5016a"
homeassistant:
customize:
binary_sensor.browser_kitchen:
friendly_name: Kitchen Motion