mirror of
https://github.com/skalavala/mysmarthome.git
synced 2025-08-21 12:42:47 +00:00
minor updates.
This commit is contained in:
80
packages/3dprinting.yaml
Normal file
80
packages/3dprinting.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
###############################################################################
|
||||
# @author : Mahasri Kalavala
|
||||
# @date : 09/04/2020
|
||||
# @package : 3D Printer
|
||||
# @description : 3D Printer Automations
|
||||
###############################################################################
|
||||
homeassistant:
|
||||
customize:
|
||||
automation.3d_print:
|
||||
icon: mdi:printer
|
||||
|
||||
#
|
||||
# Turn Off When the printer status changed from "Prnting" to anything.
|
||||
#
|
||||
automation:
|
||||
- alias: "Octoprint 3D Print"
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: "sensor.octoprint_current_state"
|
||||
from: "Printing"
|
||||
action:
|
||||
- delay: "00:00:59"
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.3d_printer
|
||||
- service: script.notify_me
|
||||
data_template:
|
||||
message: "3D Printer Status Changed from 'Printing' to {{ trigger.to_state.state }}. Turned Off the Printer!"
|
||||
|
||||
#
|
||||
# Updates on the Printer Status
|
||||
#
|
||||
- alias: "Octoprint Notify Printer State"
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: "binary_sensor.octoprint_printing"
|
||||
action:
|
||||
- service: script.notify_me
|
||||
data_template:
|
||||
message: "3D Printer Status is now {{ trigger.to_state.state }}"
|
||||
|
||||
#
|
||||
# Notifies when the printer errors out
|
||||
#
|
||||
- alias: "Octoprint Noify Printer Error"
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.octoprint_printing_error
|
||||
to: "on"
|
||||
action:
|
||||
- service: script.notify_me
|
||||
data_template:
|
||||
message: "3D Printer Status changed to 'ERROR'. Please check the printer!"
|
||||
|
||||
#
|
||||
# Provides update at frequent intervals - 25%, 50%, 75%, and 100%!
|
||||
#
|
||||
- alias: "Octoprint 3D Printer Progress Update"
|
||||
trigger:
|
||||
platform: template
|
||||
value_template:
|
||||
"{{ states('sensor.octoprint_job_percentage') |int == 25 or
|
||||
states('sensor.octoprint_job_percentage') |int == 50 or
|
||||
states('sensor.octoprint_job_percentage') |int == 75 or
|
||||
states('sensor.octoprint_job_percentage') |int == 100 }}"
|
||||
action:
|
||||
- service: script.notify_me
|
||||
data_template:
|
||||
message: >-
|
||||
{%- macro secondsToReadableString(seconds) %}
|
||||
{%- set map = {'Week': (seconds / 604800) % 604800,
|
||||
'Day': (seconds / 86400) % 7, 'Hour': (seconds / 3600) % 24,
|
||||
'Minute': (seconds / 60) % 60, 'Second': (seconds % 60) } -%}
|
||||
{%- for item in map if map[item] | int > 0 -%}
|
||||
{%- if loop.first %}{% elif loop.last %}, and {% else %}, {% endif -%}
|
||||
{{- map[item]|int }} {{ item -}} {{- 's' if map[item]|int > 1 -}}
|
||||
{%- endfor -%}
|
||||
{% endmacro %}
|
||||
3D Printer - Print job is now {{ states('sensor.octoprint_job_percentage') |int }}% complete.
|
||||
Print Time: {{ secondsToReadableString(states('sensor.octoprint_time_elapsed') |int) }}
|
||||
Print Time Left: {{ secondsToReadableString(states('sensor.octoprint_time_remaining') |int) }}
|
@@ -1,15 +1,11 @@
|
||||
homeassistant:
|
||||
customize:
|
||||
timer.timer_bathroom_aroma:
|
||||
hidden: true
|
||||
timer.timer_downstairs_aroma:
|
||||
hidden: true
|
||||
timer.timer_upstairs_aroma:
|
||||
hidden: true
|
||||
|
||||
timer:
|
||||
timer_bathroom_aroma:
|
||||
duration: "00:30:00"
|
||||
timer_downstairs_aroma:
|
||||
duration: "01:00:00"
|
||||
timer_upstairs_aroma:
|
||||
@@ -26,31 +22,6 @@ timer:
|
||||
###############################################################################
|
||||
|
||||
automation:
|
||||
#
|
||||
# Automations to start timer when they are switched ON
|
||||
#
|
||||
- alias: Bathroom Aroma Timer Start
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: switch.downstairs_fragrance
|
||||
from: "off"
|
||||
to: "on"
|
||||
action:
|
||||
- service: timer.start
|
||||
entity_id: timer.timer_bathroom_aroma
|
||||
|
||||
- alias: Bathroom Aroma Timer Finish
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: switch.downstairs_fragrance
|
||||
from: "on"
|
||||
to: "off"
|
||||
action:
|
||||
- service: timer.finish
|
||||
entity_id: timer.timer_bathroom_aroma
|
||||
|
||||
- alias: Downstairs Aroma Timer Start
|
||||
initial_state: true
|
||||
trigger:
|
||||
@@ -98,17 +69,6 @@ automation:
|
||||
#
|
||||
# Timer Elapsed Events
|
||||
#
|
||||
- alias: Bathroom Aroma Timer Elapsed
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: timer.finished
|
||||
event_data:
|
||||
entity_id: timer.timer_bathroom_aroma
|
||||
action:
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.downstairs_fragrance
|
||||
|
||||
- alias: Downstairs Aroma Timer Elapsed
|
||||
initial_state: true
|
||||
trigger:
|
||||
|
@@ -105,7 +105,7 @@ binary_sensor:
|
||||
image_processing:
|
||||
- platform: tensorflow
|
||||
scan_interval: 10000
|
||||
confidence: 75
|
||||
# confidence: 75
|
||||
source:
|
||||
- entity_id: camera.frontdoor_camera
|
||||
- entity_id: camera.driveway_camera
|
||||
@@ -116,7 +116,8 @@ image_processing:
|
||||
- "/home/homeassistant/.homeassistant/www/downloads/camera/{{- camera_entity.split('.')[1].split('_')[0] -}}/{{ camera_entity.split('.')[1].split('_')[0] }}_latest.jpg"
|
||||
- "/home/homeassistant/.homeassistant/www/downloads/camera/{{- camera_entity.split('.')[1].split('_')[0] -}}/{{ camera_entity.split('.')[1].split('_')[0] }}_{{ now().strftime('%Y%m%d_%H%M%S') }}.jpg"
|
||||
model:
|
||||
graph: /home/homeassistant/.homeassistant/tensorflow/frozen_inference_graph.pb
|
||||
graph: /home/homeassistant/.homeassistant/tensorflow/
|
||||
# graph: /home/homeassistant/.homeassistant/tensorflow/frozen_inference_graph.pb
|
||||
# categories:
|
||||
# - person
|
||||
# - car
|
||||
|
@@ -246,16 +246,16 @@ automation:
|
||||
value_template: "{{ states('sensor.bedtime_hour') |int == now().hour|int }}"
|
||||
- condition: template
|
||||
value_template: "{{ (states('sensor.bedtime_minute') |int - 15 ) == now().minute|int }}"
|
||||
- condition: state
|
||||
entity_id: light.family_room
|
||||
state: "on"
|
||||
# - condition: state
|
||||
# entity_id: light.family_room
|
||||
# state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.light_automations
|
||||
state: "on"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data:
|
||||
entity_id: light.family_room
|
||||
entity_id: light.hue_color_lamp_1, light.hue_color_lamp_2, light.hue_color_lamp_3
|
||||
brightness: 30
|
||||
color_temp: 154
|
||||
transition: 15
|
||||
|
@@ -279,7 +279,6 @@
|
||||
# - switch.rf_switch_two
|
||||
# - switch.wemobackyardlightswitch
|
||||
# - switch.frontyard_light
|
||||
# - switch.downstairs_bathroom_fragrance_outlet
|
||||
# - switch.downstairs_fragrance
|
||||
# - switch.upstairs_fragrance
|
||||
# - switch.kitchen_siren_switch
|
||||
|
@@ -84,11 +84,6 @@ sensor:
|
||||
name: "Windows Server Idle Time"
|
||||
value_template: "{{ value }}"
|
||||
|
||||
pi_hole:
|
||||
host: !secret pi_hole_ip
|
||||
ssl: false
|
||||
verify_ssl: false
|
||||
|
||||
###############################################################################
|
||||
# _ _ _
|
||||
# /\ | | | | (_)
|
||||
|
@@ -24,16 +24,6 @@ homeassistant:
|
||||
emulated_hue_name: Backyard Lights
|
||||
homebridge_name: Backyard Lights
|
||||
|
||||
light.family_room:
|
||||
friendly_name: Family Room Lights
|
||||
emulated_hue_name: Family Room Lights
|
||||
homebridge_name: Front Room Lights
|
||||
|
||||
light.master_bedroom:
|
||||
friendly_name: Master Bedroom Lights
|
||||
emulated_hue_name: Master Bedroom Lights
|
||||
homebridge_name: Master Bedroom Lights
|
||||
|
||||
switch.guest_bedroom:
|
||||
icon: mdi:lightbulb
|
||||
friendly_name: Guest Bedroom 1
|
||||
@@ -127,7 +117,7 @@ tplink:
|
||||
- host: !secret tplink_smart_outlet1
|
||||
#name: Downstairs Fragrance Outlet
|
||||
- host: !secret tplink_smart_outlet2
|
||||
#name: Downstairs Bathroom Fragrance Outlet
|
||||
#name: Downstairs 3d printer Outlet
|
||||
- host: !secret tplink_smart_outlet3
|
||||
#name: Upstairs Fragrance Outlet
|
||||
- host: !secret tplink_kids_bed_accent_light
|
||||
|
@@ -182,7 +182,7 @@ automation:
|
||||
value_template: "{{ states('input_boolean.movie_time') != 'on' }}"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.family_room
|
||||
entity_id: light.hue_color_lamp_1, light.hue_color_lamp_2, light.hue_color_lamp_3
|
||||
data_template:
|
||||
brightness: >
|
||||
{% if states('binary_sensor.sharp_tv') == "on" %}
|
||||
@@ -206,10 +206,10 @@ automation:
|
||||
to: "idle"
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id: light.family_room
|
||||
entity_id: light.hue_color_lamp_1, light.hue_color_lamp_2, light.hue_color_lamp_3
|
||||
- delay: "00:00:05"
|
||||
- service: light.turn_off
|
||||
entity_id: light.family_room
|
||||
entity_id: light.hue_color_lamp_1, light.hue_color_lamp_2, light.hue_color_lamp_3
|
||||
# Master Bedroom:
|
||||
# Motion Detected - Turn ON the lights and extend timer
|
||||
###############################################################################
|
||||
@@ -253,9 +253,6 @@ automation:
|
||||
entity_id: light.master_bedroom_1
|
||||
- service: light.turn_off
|
||||
entity_id: light.master_bedroom_2
|
||||
- delay: "00:00:05"
|
||||
- service: light.turn_off
|
||||
entity_id: light.master_bedroom
|
||||
|
||||
# # Garage:
|
||||
# # Motion Detected - Turn ON the light and extend timer
|
||||
|
@@ -117,7 +117,7 @@
|
||||
# entity_id:
|
||||
# - binary_sensor.masterbed_motion
|
||||
# - binary_sensor.masterbath_motion
|
||||
# - binary_sensor.bathroom_motion
|
||||
# - binary_sensor.bathm_motion
|
||||
# - binary_sensor.kitchen_motion
|
||||
# - binary_sensor.den_motion
|
||||
# action:
|
||||
|
@@ -103,7 +103,6 @@ automation:
|
||||
entity_id:
|
||||
- switch.basement_left
|
||||
- switch.basement_right
|
||||
- switch.bathroom_fragrance
|
||||
- switch.downstairs_fragrance
|
||||
- switch.front_room
|
||||
- switch.guest_bedroom
|
||||
@@ -113,12 +112,9 @@ automation:
|
||||
- switch.prayer_room
|
||||
- switch.upstairs_fragrance
|
||||
- switch.zwave_smart_switch_switch
|
||||
- light.family_room
|
||||
- light.family_room_2
|
||||
- light.hue_color_lamp_1
|
||||
- light.hue_color_lamp_2
|
||||
- light.hue_color_lamp_3
|
||||
- light.master_bedroom
|
||||
- light.master_bedroom_1
|
||||
- light.master_bedroom_2
|
||||
- light.master_bedroom_3
|
||||
|
@@ -33,7 +33,7 @@ automation:
|
||||
action_type: flip90
|
||||
action:
|
||||
- service_template: light.toggle
|
||||
entity_id: light.family_room
|
||||
entity_id: light.hue_color_lamp_1, light.hue_color_lamp_2, light.hue_color_lamp_3
|
||||
|
||||
# Flip 180: Lights ON Family Room Lights FULL brightness
|
||||
- alias: Family Room Cube Event flip180
|
||||
@@ -46,7 +46,7 @@ automation:
|
||||
action_type: flip180
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.family_room
|
||||
entity_id: light.hue_color_lamp_1, light.hue_color_lamp_2, light.hue_color_lamp_3
|
||||
data:
|
||||
rgb_color: [255, 251, 245]
|
||||
brightness: 254
|
||||
@@ -77,7 +77,7 @@ automation:
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.family_room
|
||||
entity_id: light.hue_color_lamp_1, light.hue_color_lamp_2, light.hue_color_lamp_3
|
||||
rgb_color:
|
||||
- "{{ range(0,255) |random }}"
|
||||
- "{{ range(0,255) |random }}"
|
||||
@@ -94,6 +94,11 @@ automation:
|
||||
action_type: shake_air
|
||||
action:
|
||||
- service: script.toggle_do_not_disturb
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.wemoswitch1
|
||||
- delay: "00:00:02"
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.wemoswitch1
|
||||
|
||||
################################################################################
|
||||
# ______ _ _____
|
||||
@@ -117,7 +122,7 @@ automation:
|
||||
entity_id: switch.front_room
|
||||
|
||||
# Flip 180: Toggle Office Room Accent Lights
|
||||
- alias: Family Room Cube Event flip180
|
||||
- alias: Front Room Cube Event flip180
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: event
|
||||
@@ -130,7 +135,7 @@ automation:
|
||||
entity_id: switch.zwave_smart_switch_switch
|
||||
|
||||
# Move: Toggle Office Room Light
|
||||
- alias: Family Room Cube Event Move
|
||||
- alias: Front Room Cube Event Move
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: event
|
||||
@@ -143,7 +148,7 @@ automation:
|
||||
entity_id: switch.office_room
|
||||
|
||||
# Shake: Toggle Do Not Disturb Mode
|
||||
- alias: Family Room Cube Event Shake
|
||||
- alias: Front Room Cube Event Shake
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: event
|
||||
@@ -289,7 +294,9 @@ automation:
|
||||
action_type: flip180
|
||||
action:
|
||||
- service: light.toggle
|
||||
entity_id: light.master_bedroom
|
||||
entity_id: light.master_bedroom_1
|
||||
- service: light.toggle
|
||||
entity_id: light.master_bedroom_2
|
||||
|
||||
# Move: Turn ON Master Bedroom Lights
|
||||
- alias: Master Bedroom Cube Event Move
|
||||
@@ -302,7 +309,9 @@ automation:
|
||||
action_type: move
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.master_bedroom
|
||||
entity_id: light.master_bedroom_1
|
||||
- service: light.turn_on
|
||||
entity_id: light.master_bedroom_2
|
||||
|
||||
# Double Tap: Turn OFF Downstairs Lights
|
||||
- alias: Master Bedroom Cube Event Tap Twice
|
||||
@@ -316,7 +325,14 @@ automation:
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.master_bedroom
|
||||
entity_id: light.master_bedroom_1
|
||||
rgb_color:
|
||||
- "{{ range(0,255) |random }}"
|
||||
- "{{ range(0,255) |random }}"
|
||||
- "{{ range(0,255) |random }}"
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.master_bedroom_2
|
||||
rgb_color:
|
||||
- "{{ range(0,255) |random }}"
|
||||
- "{{ range(0,255) |random }}"
|
||||
|
@@ -397,7 +397,9 @@ automation:
|
||||
scene_id: 1
|
||||
action:
|
||||
- service: light.toggle
|
||||
entity_id: light.master_bedroom
|
||||
entity_id: light.master_bedroom_1
|
||||
- service: light.toggle
|
||||
entity_id: light.master_bedroom_2
|
||||
|
||||
- alias: WallMote Button 2 Pressed
|
||||
trigger:
|
||||
|
Reference in New Issue
Block a user