Reduce the number of calls in the logbook.

This commit is contained in:
ccostan 2022-06-21 10:36:35 -04:00
parent e5b9075bc1
commit cf085ad159
7 changed files with 17 additions and 284 deletions

View File

@ -16,24 +16,11 @@
who: 'carlo'
apns_id: 'information'
- service: homeassistant.update_entity
entity_id: binary_sensor.updater
- service: homeassistant.turn_off
entity_id:
- light.hallway_lights
#- switch.spaceship_update_switch - Tesla integration was removed.
- service: mqtt.publish
data:
topic: "garadget/GSmall/command"
payload: "get-status"
- service: mqtt.publish
data:
topic: "garadget/GLarge/command"
payload: "get-status"
- service: group.set
data:
object_id: "arriving"
@ -50,5 +37,4 @@
title: "Home Assistant Restarted"
data:
type: announce
#method: all
message: "Home Assistant has been restarted."

View File

@ -5,15 +5,6 @@
######################################################################################################
homeassistant:
name: Bear Stone
latitude: !secret homeassistant_latitude
longitude: !secret homeassistant_longitude
elevation: !secret homeassistant_elevation
unit_system: imperial
time_zone: America/New_York
currency: USD
external_url: !secret external_url
internal_url: !secret internal_url
# customize: !include_dir_merge_named customize
customize_domain:
automation:
@ -26,8 +17,6 @@ homeassistant:
- 192.168.10.0/24
# - !secret external_ip
allow_bypass_login: true
# - type: legacy_api_password
# api_password: !secret http_password
network:
zeroconf:
system_health:
@ -70,12 +59,12 @@ cloud:
# light.kitchen_lights:
# display_categories: LIGHT
http:
server_port: !secret http_port
ssl_certificate: !secret ssl_certificate
ssl_key: !secret ssl_key
ip_ban_enabled: false
login_attempts_threshold: 3
# http:
# server_port: !secret http_port
# ssl_certificate: !secret ssl_certificate
# ssl_key: !secret ssl_key
# ip_ban_enabled: false
# login_attempts_threshold: 3
frontend:

View File

@ -1,243 +0,0 @@
#-------------------------------------------
# # @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
## Garadget_Stuff - [Garadget](https://amzn.to/2jQLpVQ) - Garage Door opener/sensor
# Video and Write Up - https://www.vcloudinfo.com/2019/03/how-to-add-garadget-to-home-assistant.html
# Switch to Access_Tokens - https://www.vcloudinfo.com/2020/05/fixing-garadget-in-home-assistant.html
#-------------------------------------------
cover:
- platform: mqtt
name: "Small Garage Door"
device_class: 'garage'
command_topic: "garadget/GSmall/command"
state_topic: "garadget/GSmall/status"
value_template: >-
{% if value_json.status == 'closed' %}
closed
{% else %}
open
{% endif %}
payload_open: "open"
payload_close: "close"
payload_stop: "stop"
- platform: mqtt
name: "Large Garage Door"
device_class: 'garage'
command_topic: "garadget/GLarge/command"
state_topic: "garadget/GLarge/status"
value_template: >-
{% if value_json.status == 'closed' %}
closed
{% else %}
open
{% endif %}
payload_open: "open"
payload_close: "close"
payload_stop: "stop"
sensor:
- platform: mqtt
name: "Large Garage Door Since"
state_topic: "garadget/GLarge/status"
value_template: '{{ value_json.time }}'
- platform: mqtt
name: "Large Garage Door Brightness"
state_topic: "garadget/GLarge/status"
unit_of_measurement: '%'
value_template: '{{ value_json.bright }}'
- platform: mqtt
name: "Small Garage Door Since"
state_topic: "garadget/GSmall/status"
value_template: '{{ value_json.time }}'
- platform: mqtt
name: "Small Garage Door Brightness"
state_topic: "garadget/GSmall/status"
unit_of_measurement: '%'
value_template: '{{ value_json.bright }}'
group:
garage_doors: # This group is used to check if doors are open or Closed.
name: Garage Doors
entities:
- cover.large_garage_door
- cover.small_garage_door
######################################################################
## Garage Status Announcements - Only during normal hours.
######################################################################
automation:
- alias: 'Update Garage Get-Status'
id: 2b9e8359-c189-4399-b415-50107513fe90
trigger:
- platform: time_pattern
minutes: '/1'
action:
- service: mqtt.publish
data:
topic: "garadget/GSmall/command"
payload: "get-status"
- service: mqtt.publish
data:
topic: "garadget/GLarge/command"
payload: "get-status"
- alias: 'Garage Door State Change'
id: afec0987-edb1-4341-a524-a00ae4df9fb7
mode: restart
trigger:
- platform: state
entity_id:
- cover.large_garage_door
- cover.small_garage_door
from: 'open'
to: 'closed'
for: '00:02:00'
- platform: state
entity_id:
- cover.large_garage_door
- cover.small_garage_door
from: 'closed'
to: 'open'
for: '00:02:30'
action:
- choose:
- conditions: "{{ is_state('cover.large_garage_door','closed') }}"
sequence:
- service: script.speech_engine
data:
DoorClosed: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}."
call_garage_check: 1
- delay: "00:20:00"
- service: script.garage_lights_off
default:
- service: script.speech_engine
data:
DoorClosed: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}."
call_garage_check: 1
###################################
## Garadget Wind Door Checks - [Garadget](https://amzn.to/2jQLpVQ)
###################################
- alias: 'Wind Speed Garage Door Check'
id: 2819207a-1716-4552-be34-a8e0f7af004e
trigger:
- platform: numeric_state
entity_id: sensor.dark_sky_wind_speed
above: 20
condition:
- condition: or
conditions:
- condition: state
entity_id: cover.large_garage_door
state: 'opened'
- condition: state
entity_id: cover.small_garage_door
state: 'opened'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.alert_mode
- service: script.notify_engine
data:
title: 'Check/Close Garage Doors - High Speed Wind Alert:'
value1: "Small: {{ states('cover.small_garage_door')}}"
value2: "Large: {{ states('cover.large_garage_door')}}"
apns_id: 'information'
who: 'parents'
- service: script.speech_engine
data:
value1: >
"The winds are picking up outside. The wind speed is {{ states('sensor.dark_sky_wind_speed')|round}} miles per hour. For safety, please close the garage doors.
{% if is_state('cover.large_garage_door', 'open') -%}
The Large Garage Door is open
{% endif -%}
{% if is_state('cover.small_garage_door', 'open') -%}
{% if is_state('cover.large_garage_door', 'open') -%}and
{%- endif %} The small Garage Door is open.
{% endif %}"
- service: script.tweet_engine_image
data:
tweet: >
{{ [
"Wind speed is {{ states('sensor.dark_sky_wind_speed')|round}} miles per hour. For safety, I'm going to close the @garadget doors.",
"Getting pretty windy! {{ states('sensor.dark_sky_wind_speed')|round}}MPH. Time to ask @Garadget to close the garage doors."
] | random + "(https://amzn.to/2jQLpVQ)"}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/windy.png"
] | random }}
##############################################################################
- alias: Is the Garage door Open at night - Checks every 30 minutes or 5 minutes after we drive away.
id: 4eb3e83e-4484-4102-a4ca-6bacd5b3cbdd
trigger:
- platform: time_pattern
minutes: '/45'
- platform: state
entity_id: group.family
to: not_home
for: 00:05:00
- platform: state
entity_id: input_boolean.tv_time
to: 'on'
from: 'off'
condition:
condition: or
conditions:
- condition: and
conditions:
- condition: state
entity_id: group.family
state: not_home
for: 00:05:00
- condition: or
conditions:
- condition: template
value_template: "{{ states('cover.large_garage_door') == 'opened' }}"
- condition: template
value_template: "{{ states('cover.small_garage_door') == 'opened' }}"
- condition: and
conditions:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: or
conditions:
- condition: template
value_template: "{{ states('cover.large_garage_door') == 'opened' }}"
- condition: template
value_template: "{{ states('cover.small_garage_door') == 'opened'}}"
action:
- service: script.notify_engine
data:
title: 'Check Garage Doors:'
value1: "Small: {{ states('cover.small_garage_door')}}"
value2: "Large: {{ states('cover.large_garage_door')}}"
who: "family"
camera_entity: "camera.camera2"
apns_id: 'information'
- service: script.speech_engine
data:
value1: "Please check the garage doors. The Small garage is {{ states('cover.small_garage_door')}} and the large garage is {{ states('cover.large_garage_door')}}"

View File

@ -8,9 +8,9 @@
### Configuration - Authentication via the DEVELOPER Portal
##############################################################################
neato:
client_id: !secret neato_client_id
client_secret: !secret neato_client_secret
# neato:
# client_id: !secret neato_client_id
# client_secret: !secret neato_client_secret
##############################################################################
### Automations - Tweet out When neato is heading back to his Dock for recharging.

View File

@ -5,13 +5,12 @@
#-------------------------------------------
#------ISS----------------------------------
#-------------------------------------------
binary_sensor:
- platform: iss
show_on_map: true
# binary_sensor:
# - platform: iss
# show_on_map: true
#-------------------------------------------
sensor:
- platform: launch_library
- platform: moon

View File

@ -83,9 +83,9 @@ sensor:
duration:
days: 7
- platform: version
name: HA Installed Version
scan_interval: 86400
# - platform: version
# name: HA Installed Version
# scan_interval: 86400
- platform: command_line
name: "HA Uptime"

View File

@ -45,6 +45,8 @@ exclude:
- sensor.pi_hole_ads_percentage_blocked_today
- sensor.pi_hole_dns_queries_today
- sensor.small_garage_door_since
- sensor.sleepnumber_carlo_carlo_pressure
- sensor.sleepnumber_carlo_stacey_pressure
- sensor.time
- sensor.rachio_watering_time
- sun.sun