mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-09 10:14:41 +00:00
Initial Mercury Setup
This commit is contained in:
@@ -101,6 +101,10 @@ cards:
|
||||
entity: input_boolean.guest_mode
|
||||
tap_action:
|
||||
action: toggle
|
||||
- type: custom:button-card
|
||||
template: [small, with_state_background]
|
||||
entity: switch.mercury_home_mode
|
||||
name: Mercury Home
|
||||
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
@@ -134,13 +138,6 @@ cards:
|
||||
variables:
|
||||
state_indicator_id: automation.titanium_turn_off_when_idle
|
||||
|
||||
- type: custom:button-card
|
||||
template: [small, with_state_background]
|
||||
entity: sensor.synology_type_volume_1
|
||||
name: Platinum
|
||||
icon: mdi:nas
|
||||
tap_action:
|
||||
action: more-info
|
||||
- type: custom:button-card
|
||||
template: [small, with_state_background]
|
||||
entity: binary_sensor.pi_hole_enabled
|
||||
@@ -165,10 +162,6 @@ cards:
|
||||
name: "Kitchen"
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
- type: custom:button-card
|
||||
template: [small, with_state_background]
|
||||
entity: switch.camera
|
||||
name: Camera
|
||||
- type: custom:button-card
|
||||
template: [small, with_state_background, with_state_indicator]
|
||||
entity: fan.philips_airpurifier
|
||||
|
||||
@@ -104,6 +104,10 @@ cards:
|
||||
entity: input_boolean.guest_mode
|
||||
tap_action:
|
||||
action: toggle
|
||||
- type: custom:button-card
|
||||
template: [small, with_state_background]
|
||||
entity: switch.mercury_home_mode
|
||||
name: Mercury Home
|
||||
- type: custom:button-card
|
||||
template: small
|
||||
entity: media_player.living_room_tv
|
||||
@@ -146,10 +150,6 @@ cards:
|
||||
template: [radiator_button, small]
|
||||
entity: climate.kitchen_radiator_mode
|
||||
name: "Kitchen"
|
||||
- type: custom:button-card
|
||||
template: [small, with_state_background]
|
||||
entity: switch.camera
|
||||
name: Camera
|
||||
- type: custom:button-card
|
||||
template: [small, with_state_indicator]
|
||||
entity: fan.philips_airpurifier
|
||||
|
||||
@@ -94,13 +94,6 @@
|
||||
entity: switch.titanium
|
||||
variables:
|
||||
state_indicator_id: automation.titanium_turn_off_when_idle
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: sensor.synology_type_volume_1
|
||||
name: Platinum
|
||||
icon: mdi:nas
|
||||
tap_action:
|
||||
action: more-info
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: binary_sensor.pi_hole_enabled
|
||||
@@ -134,13 +127,9 @@
|
||||
title: Camera
|
||||
cards:
|
||||
- type: picture-glance
|
||||
camera_image: camera.amcrest_camera
|
||||
camera_image: camera.mercury_amcrest_1
|
||||
entities:
|
||||
- entity: camera.amcrest_camera
|
||||
- entity: switch.camera
|
||||
show_state: false
|
||||
- entity: binary_sensor.amcrest_camera_online
|
||||
show_state: false
|
||||
- entity: camera.mercury_amcrest_1
|
||||
|
||||
|
||||
- type: vertical-stack
|
||||
|
||||
@@ -120,13 +120,6 @@
|
||||
variables:
|
||||
state_indicator_id: automation.titanium_turn_off_when_idle
|
||||
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: sensor.synology_type_volume_1
|
||||
name: Platinum
|
||||
icon: mdi:nas
|
||||
tap_action:
|
||||
action: more-info
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: binary_sensor.pi_hole_enabled
|
||||
@@ -153,7 +146,7 @@
|
||||
cards:
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: switch.camera
|
||||
entity: binary_sensor.camera_state
|
||||
name: Camera
|
||||
- type: custom:button-card
|
||||
template: [default, with_state_indicator]
|
||||
@@ -211,6 +204,10 @@
|
||||
entity: input_boolean.guest_mode
|
||||
tap_action:
|
||||
action: toggle
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: switch.mercury_home_mode
|
||||
name: Mercury
|
||||
|
||||
- type: vertical-stack
|
||||
cards:
|
||||
|
||||
@@ -71,7 +71,7 @@ sensor.synology_type_volume_1:
|
||||
type: custom:decluttering-card
|
||||
template: platinum_card
|
||||
|
||||
switch.camera:
|
||||
binary_sensor.camera_state:
|
||||
title: Security camera
|
||||
style: *popup_style
|
||||
auto_close: true
|
||||
@@ -80,17 +80,10 @@ switch.camera:
|
||||
cards:
|
||||
- type: picture-entity
|
||||
aspect_ratio: 50%
|
||||
entity: camera.amcrest_camera
|
||||
entity: camera.mercury_amcrest_1
|
||||
show_name: true
|
||||
show_state: true
|
||||
|
||||
- type: entities
|
||||
title: Camera Controls
|
||||
show_header_toggle: false
|
||||
entities:
|
||||
- switch.camera
|
||||
- binary_sensor.amcrest_camera_online
|
||||
|
||||
media_player.kitchen:
|
||||
title: Kitchen Sonos
|
||||
style: *popup_style
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# https://www.home-assistant.io/integrations/amcrest
|
||||
amcrest:
|
||||
- host: !secret amcrest_ip
|
||||
username: !secret amcrest_username
|
||||
password: !secret amcrest_password
|
||||
resolution: low
|
||||
binary_sensors:
|
||||
- online
|
||||
# amcrest:
|
||||
# - host: !secret amcrest_ip
|
||||
# username: !secret amcrest_username
|
||||
# password: !secret amcrest_password
|
||||
# resolution: low
|
||||
# binary_sensors:
|
||||
# - online
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
@@ -14,59 +14,10 @@ binary_sensor:
|
||||
friendly_name: Security camera
|
||||
device_class: safety
|
||||
value_template: >-
|
||||
{{ is_state('camera.amcrest_camera', 'streaming') or is_state('camera.amcrest_camera', 'recording') }}
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
switches:
|
||||
camera:
|
||||
friendly_name: Security camera
|
||||
value_template: "{{ is_state('binary_sensor.camera_state', 'on') }}"
|
||||
icon_template: >
|
||||
{% if is_state('binary_sensor.camera_state', 'on') %} mdi:shield-home
|
||||
{% else %} mdi:shield-off
|
||||
{{ is_state('camera.mercury_amcrest_1', 'streaming') or is_state('camera.mercury_amcrest_1', 'recording') }}
|
||||
icon_template: >-
|
||||
{% if is_state('camera.mercury_amcrest_1', 'streaming') or is_state('camera.mercury_amcrest_1', 'recording') %}
|
||||
mdi:video
|
||||
{% else %}
|
||||
mdi:video-off
|
||||
{% endif %}
|
||||
turn_on:
|
||||
service: script.security_camera_on
|
||||
turn_off:
|
||||
service: script.security_camera_off
|
||||
|
||||
script:
|
||||
security_camera_on:
|
||||
alias: Security camera · Turn on
|
||||
sequence:
|
||||
- service: camera.turn_on
|
||||
entity_id: camera.amcrest_camera
|
||||
- service: amcrest.goto_preset
|
||||
entity_id: camera.amcrest_camera
|
||||
data:
|
||||
preset: 1
|
||||
- service: amcrest.enable_recording
|
||||
entity_id: camera.amcrest_camera
|
||||
- service: amcrest.enable_audio
|
||||
entity_id: camera.amcrest_camera
|
||||
|
||||
security_camera_off:
|
||||
alias: Security camera · Turn off
|
||||
sequence:
|
||||
- service: amcrest.goto_preset
|
||||
entity_id: camera.amcrest_camera
|
||||
data:
|
||||
preset: 2
|
||||
- service: amcrest.disable_recording
|
||||
entity_id: camera.amcrest_camera
|
||||
- service: amcrest.disable_audio
|
||||
entity_id: camera.amcrest_camera
|
||||
- service: camera.turn_off
|
||||
entity_id: camera.amcrest_camera
|
||||
|
||||
automation:
|
||||
# Hack - the switch.camera initial state is wrong (ON) when the server starts.
|
||||
- alias: Camera · Startup
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- delay: 00:00:10
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.camera
|
||||
|
||||
@@ -16,7 +16,8 @@ script:
|
||||
data:
|
||||
brightness_pct: 100
|
||||
- service: script.bed_led_on
|
||||
- service: script.security_camera_off
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.mercury_home_mode
|
||||
- service: script.routine_coming_home_after_sunset
|
||||
- service: input_select.select_option
|
||||
entity_id: input_select.hallway_dashboard_mode
|
||||
|
||||
@@ -2,7 +2,8 @@ script:
|
||||
routine_leaving_home:
|
||||
alias: Routine · Leaving home
|
||||
sequence:
|
||||
- service: script.security_camera_on
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.mercury_home_mode
|
||||
|
||||
- service: homeassistant.turn_off
|
||||
entity_id:
|
||||
|
||||
Reference in New Issue
Block a user