Initial commit
This commit is contained in:
1
.HA_VERSION
Normal file
1
.HA_VERSION
Normal file
@@ -0,0 +1 @@
|
||||
2024.10.3
|
||||
13
.gitignore
vendored
Normal file
13
.gitignore
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
.storage/*
|
||||
custom_components/*
|
||||
www/community/*
|
||||
image/*
|
||||
|
||||
*.log
|
||||
*.log*
|
||||
*.db
|
||||
*.db*
|
||||
*.pem
|
||||
*.csv
|
||||
sdkconfig.*
|
||||
|
||||
451
automations.yaml
Normal file
451
automations.yaml
Normal file
@@ -0,0 +1,451 @@
|
||||
- id: '1634559948824'
|
||||
alias: Set low dehumidification dew point set point
|
||||
description: Set low dehumidification dew point set point
|
||||
trigger:
|
||||
- platform: mqtt
|
||||
topic: frankensystem/set_points/dehumidfy/low_dew_point
|
||||
condition: []
|
||||
action:
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.low_dehumidification_dew_point
|
||||
data:
|
||||
value: '{{ trigger.payload | float }}'
|
||||
mode: single
|
||||
- id: '1634560389704'
|
||||
alias: Publish Low Dehumidification Dew Point
|
||||
description: Publishes the low dehumidification set point to an MQTT topic
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_number.low_dehumidification_dew_point
|
||||
condition: []
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: frankensystem/set_points/dehumidify/low_dew_point
|
||||
retain: true
|
||||
payload: '{{ states(''input_number.low_dehumidification_dew_point'') | float
|
||||
}}'
|
||||
mode: single
|
||||
- id: '1634561011408'
|
||||
alias: Set high dehumidification dew point
|
||||
description: Sets the high dehumidification dew point set point.
|
||||
trigger:
|
||||
- platform: mqtt
|
||||
topic: frankensystem/set_points/dehumidify/high_dew_point
|
||||
condition: []
|
||||
action:
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.high_dehumidification_dew_point
|
||||
data:
|
||||
value: '{{ trigger.payload | float }}'
|
||||
mode: single
|
||||
- id: '1634561223655'
|
||||
alias: Publish High Dew Point Set Point
|
||||
description: Publishes the high dew point set point to MQTT
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_number.high_dehumidification_dew_point
|
||||
condition: []
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: frankensystem/set_points/dehumidify/high_dew_point
|
||||
retain: true
|
||||
payload: '{{ states(''input_number.high_dehumidification_dew_point'') | float
|
||||
}}'
|
||||
mode: single
|
||||
- id: '1634559948834'
|
||||
alias: Set low dehumidification relative humidity
|
||||
description: Set low dehumidification relative humidity set point
|
||||
trigger:
|
||||
- platform: mqtt
|
||||
topic: frankensystem/set_points/dehumidfy/low_relative_humidity
|
||||
condition: []
|
||||
action:
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.low_dehumidification_relative_humidity
|
||||
data:
|
||||
value: '{{ trigger.payload | float }}'
|
||||
mode: single
|
||||
- id: '1634560389714'
|
||||
alias: Publish Low Dehumidification Relative Humidity
|
||||
description: Publishes the low dehumidification set point to an MQTT topic
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_number.low_dehumidification_relative_humidity
|
||||
condition: []
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: frankensystem/set_points/dehumidify/low_relative_humidity
|
||||
retain: true
|
||||
payload: '{{ states(''input_number.low_dehumidification_relative_humidity'')
|
||||
| float }}'
|
||||
mode: single
|
||||
- id: '1634561011428'
|
||||
alias: Set high dehumidification relative humidity set point
|
||||
description: Sets the high dehumidification relative humidity set point.
|
||||
trigger:
|
||||
- platform: mqtt
|
||||
topic: frankensystem/set_points/dehumidify/high_relative_humidity
|
||||
condition: []
|
||||
action:
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.high_dehumidification_relative_humidity
|
||||
data:
|
||||
value: '{{ trigger.payload | float }}'
|
||||
mode: single
|
||||
- id: '1634561223665'
|
||||
alias: Publish Dehumidification High Relative Humidity Set Point
|
||||
description: Publishes the high relative humidity set point to MQTT
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_number.high_dehumidification_relative_humidity
|
||||
condition: []
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: frankensystem/set_points/dehumidify/high_dew_point
|
||||
retain: true
|
||||
payload: '{{ states(''input_number.high_dehumidification_relative_humidity'')
|
||||
| float }}'
|
||||
mode: single
|
||||
- id: '1634569072478'
|
||||
alias: Interlock Dehumidification Dew Point Turns Off Relative Humidity
|
||||
description: Ensures that dehumidification mode is either set to relative humidity
|
||||
or dew point mode.
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.enable_dew_point_dehumidification_mode
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.enable_dew_point_dehumidification_mode
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.enable_relative_humidity_dehumidification_mode
|
||||
mode: single
|
||||
- id: '1634569532222'
|
||||
alias: Interlock Dehumidification Relative Humidity Turns OFF Dew Point Mode
|
||||
description: Ensures that the dehumidification mode is either dew point or relative
|
||||
humidity
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.enable_relative_humidity_dehumidification_mode
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.enable_relative_humidity_dehumidification_mode
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.enable_dew_point_dehumidification_mode
|
||||
mode: single
|
||||
- id: '1634570370065'
|
||||
alias: Interlock Humidification Dew Point Enabled Turns OFF Relative Humidity
|
||||
description: Ensures that humidification mode can only be in dew point or relative
|
||||
humidity control mode.
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.enable_dew_point_humidification_mode
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.enable_dew_point_humidification_mode
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.enable_relative_humidity_humidification_mode
|
||||
mode: single
|
||||
- id: '1634570480746'
|
||||
alias: Interlock Relative Humidity Humidification Mode Turns OFF Dew Point Mode
|
||||
description: Ensures that humidification mode can only be in relative humidity or
|
||||
dew point control modes.
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.enable_relative_humidity_humidification_mode
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.enable_relative_humidity_humidification_mode
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.enable_dew_point_humidification_mode
|
||||
mode: single
|
||||
- id: '1710435997779'
|
||||
alias: Renew Let's Encrypt Certificates
|
||||
description: Restarts the Let's Encrypt add-on in order to renew certificates on
|
||||
a regular basis.
|
||||
trigger:
|
||||
- platform: time
|
||||
at: 02:03:00
|
||||
condition: []
|
||||
action:
|
||||
- service: hassio.addon_start
|
||||
metadata: {}
|
||||
data:
|
||||
addon: core_letsencrypt
|
||||
mode: single
|
||||
- id: '1729261288287'
|
||||
alias: Fan High Interlock
|
||||
description: Turns off other fan speeds when fan high switch is turned on.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- switch.fan_high_2
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
conditions: []
|
||||
actions:
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_low_2
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_medium_low
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_medium_high_2
|
||||
mode: single
|
||||
- id: '1729261435039'
|
||||
alias: Fan Medium High Interlock
|
||||
description: Turns off other fan speeds when fan medium-high switch is turned on.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- switch.fan_medium_high_2
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
conditions: []
|
||||
actions:
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_low_2
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_medium_low
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_high_2
|
||||
mode: single
|
||||
- id: '1729261831943'
|
||||
alias: Fan Medium Low Interlock
|
||||
description: Turns off other fan speeds when fan medium-low switch is turned on.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- switch.fan_medium_low_2
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
conditions: []
|
||||
actions:
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_low_2
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_medium_high_2
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_high_2
|
||||
mode: single
|
||||
- id: '1729261921904'
|
||||
alias: Fan Low Interlock
|
||||
description: Turns off other fan speeds when fan low switch is turned on.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- switch.fan_low_2
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
conditions: []
|
||||
actions:
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_medium_low
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_medium_high_2
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_high_2
|
||||
mode: single
|
||||
- id: '1729262656389'
|
||||
alias: Ensure Fan Speed is ON
|
||||
description: Ensures at least low fan speed is on if all other fan speeds are toggled
|
||||
off.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- switch.fan_high_2
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 2
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- switch.fan_medium_high_2
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 2
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- switch.fan_medium_low_2
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 2
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- switch.fan_low_2
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 2
|
||||
conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: switch.fan_low_2
|
||||
state: 'off'
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 2
|
||||
- condition: state
|
||||
entity_id: switch.fan_medium_low_2
|
||||
state: 'off'
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 2
|
||||
- condition: state
|
||||
entity_id: switch.fan_medium_high_2
|
||||
state: 'off'
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 2
|
||||
- condition: state
|
||||
entity_id: switch.fan_high_2
|
||||
state: 'off'
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 2
|
||||
actions:
|
||||
- action: switch.turn_on
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_low_2
|
||||
mode: single
|
||||
- id: '1729291609123'
|
||||
alias: Interlock Fan Speed Selection with Switch
|
||||
description: Activates the appropriate switch when a fan speed is chosen by the
|
||||
select menu.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- input_select.frankensystem_fan_speed
|
||||
conditions: []
|
||||
actions:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_select.frankensystem_fan_speed
|
||||
state: High
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
then:
|
||||
- action: switch.turn_on
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_high_2
|
||||
else:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_select.frankensystem_fan_speed
|
||||
state: Medium-High
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
then:
|
||||
- action: switch.turn_on
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_medium_high_2
|
||||
else:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_select.frankensystem_fan_speed
|
||||
state: Medium-Low
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
then:
|
||||
- action: switch.turn_on
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_medium_low_2
|
||||
else:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_select.frankensystem_fan_speed
|
||||
state: Low
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
then:
|
||||
- action: switch.turn_on
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.fan_low_2
|
||||
mode: single
|
||||
54
blueprints/automation/homeassistant/motion_light.yaml
Normal file
54
blueprints/automation/homeassistant/motion_light.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
blueprint:
|
||||
name: Motion-activated Light
|
||||
description: Turn on a light when motion is detected.
|
||||
domain: automation
|
||||
source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/motion_light.yaml
|
||||
input:
|
||||
motion_entity:
|
||||
name: Motion Sensor
|
||||
selector:
|
||||
entity:
|
||||
domain: binary_sensor
|
||||
device_class: motion
|
||||
light_target:
|
||||
name: Light
|
||||
selector:
|
||||
target:
|
||||
entity:
|
||||
domain: light
|
||||
no_motion_wait:
|
||||
name: Wait time
|
||||
description: Time to leave the light on after last motion is detected.
|
||||
default: 120
|
||||
selector:
|
||||
number:
|
||||
min: 0
|
||||
max: 3600
|
||||
unit_of_measurement: seconds
|
||||
|
||||
# If motion is detected within the delay,
|
||||
# we restart the script.
|
||||
mode: restart
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: !input motion_entity
|
||||
from: "off"
|
||||
to: "on"
|
||||
|
||||
action:
|
||||
- alias: "Turn on the light"
|
||||
service: light.turn_on
|
||||
target: !input light_target
|
||||
- alias: "Wait until there is no motion from device"
|
||||
wait_for_trigger:
|
||||
platform: state
|
||||
entity_id: !input motion_entity
|
||||
from: "on"
|
||||
to: "off"
|
||||
- alias: "Wait the number of seconds that has been set"
|
||||
delay: !input no_motion_wait
|
||||
- alias: "Turn off the light"
|
||||
service: light.turn_off
|
||||
target: !input light_target
|
||||
44
blueprints/automation/homeassistant/notify_leaving_zone.yaml
Normal file
44
blueprints/automation/homeassistant/notify_leaving_zone.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
blueprint:
|
||||
name: Zone Notification
|
||||
description: Send a notification to a device when a person leaves a specific zone.
|
||||
domain: automation
|
||||
source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/notify_leaving_zone.yaml
|
||||
input:
|
||||
person_entity:
|
||||
name: Person
|
||||
selector:
|
||||
entity:
|
||||
domain: person
|
||||
zone_entity:
|
||||
name: Zone
|
||||
selector:
|
||||
entity:
|
||||
domain: zone
|
||||
notify_device:
|
||||
name: Device to notify
|
||||
description: Device needs to run the official Home Assistant app to receive notifications.
|
||||
selector:
|
||||
device:
|
||||
integration: mobile_app
|
||||
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: !input person_entity
|
||||
|
||||
variables:
|
||||
zone_entity: !input zone_entity
|
||||
# This is the state of the person when it's in this zone.
|
||||
zone_state: "{{ states[zone_entity].name }}"
|
||||
person_entity: !input person_entity
|
||||
person_name: "{{ states[person_entity].name }}"
|
||||
|
||||
condition:
|
||||
condition: template
|
||||
value_template: "{{ trigger.from_state.state == zone_state and trigger.to_state.state != zone_state }}"
|
||||
|
||||
action:
|
||||
- alias: "Notify that a person has left the zone"
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
device_id: !input notify_device
|
||||
message: "{{ person_name }} has left {{ zone_state }}"
|
||||
@@ -0,0 +1,84 @@
|
||||
blueprint:
|
||||
name: Confirmable Notification
|
||||
description: >-
|
||||
A script that sends an actionable notification with a confirmation before
|
||||
running the specified action.
|
||||
domain: script
|
||||
source_url: https://github.com/home-assistant/core/blob/master/homeassistant/components/script/blueprints/confirmable_notification.yaml
|
||||
input:
|
||||
notify_device:
|
||||
name: Device to notify
|
||||
description: Device needs to run the official Home Assistant app to receive notifications.
|
||||
selector:
|
||||
device:
|
||||
integration: mobile_app
|
||||
title:
|
||||
name: "Title"
|
||||
description: "The title of the button shown in the notification."
|
||||
default: ""
|
||||
selector:
|
||||
text:
|
||||
message:
|
||||
name: "Message"
|
||||
description: "The message body"
|
||||
selector:
|
||||
text:
|
||||
confirm_text:
|
||||
name: "Confirmation Text"
|
||||
description: "Text to show on the confirmation button"
|
||||
default: "Confirm"
|
||||
selector:
|
||||
text:
|
||||
confirm_action:
|
||||
name: "Confirmation Action"
|
||||
description: "Action to run when notification is confirmed"
|
||||
default: []
|
||||
selector:
|
||||
action:
|
||||
dismiss_text:
|
||||
name: "Dismiss Text"
|
||||
description: "Text to show on the dismiss button"
|
||||
default: "Dismiss"
|
||||
selector:
|
||||
text:
|
||||
dismiss_action:
|
||||
name: "Dismiss Action"
|
||||
description: "Action to run when notification is dismissed"
|
||||
default: []
|
||||
selector:
|
||||
action:
|
||||
|
||||
mode: restart
|
||||
|
||||
sequence:
|
||||
- alias: "Set up variables"
|
||||
variables:
|
||||
action_confirm: "{{ 'CONFIRM_' ~ context.id }}"
|
||||
action_dismiss: "{{ 'DISMISS_' ~ context.id }}"
|
||||
- alias: "Send notification"
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
device_id: !input notify_device
|
||||
title: !input title
|
||||
message: !input message
|
||||
data:
|
||||
actions:
|
||||
- action: "{{ action_confirm }}"
|
||||
title: !input confirm_text
|
||||
- action: "{{ action_dismiss }}"
|
||||
title: !input dismiss_text
|
||||
- alias: "Awaiting response"
|
||||
wait_for_trigger:
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
action: "{{ action_confirm }}"
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
action: "{{ action_dismiss }}"
|
||||
- choose:
|
||||
- conditions: "{{ wait.trigger.event.data.action == action_confirm }}"
|
||||
sequence: !input confirm_action
|
||||
- conditions: "{{ wait.trigger.event.data.action == action_dismiss }}"
|
||||
sequence: !input dismiss_action
|
||||
26
configuration.yaml
Normal file
26
configuration.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
homeassistant:
|
||||
packages: !include_dir_named packages/
|
||||
|
||||
# Configure a default setup of Home Assistant (frontend, api, etc)
|
||||
default_config:
|
||||
|
||||
# Text to speech
|
||||
tts:
|
||||
- platform: google_translate
|
||||
|
||||
group: !include groups.yaml
|
||||
automation: !include automations.yaml
|
||||
script: !include scripts.yaml
|
||||
scene: !include scenes.yaml
|
||||
#sensor: !include sensors.yaml
|
||||
#switch: !include switches.yaml
|
||||
#influxdb: !include influxdb.yaml
|
||||
template: !include templates.yaml
|
||||
|
||||
# Example configuration.yaml entry for the HTTP component
|
||||
http:
|
||||
server_port: 443
|
||||
ssl_certificate: /ssl/fullchain.pem
|
||||
ssl_key: /ssl/privkey.pem
|
||||
|
||||
|
||||
38
custom_templates/frankensystem.jinja
Normal file
38
custom_templates/frankensystem.jinja
Normal file
@@ -0,0 +1,38 @@
|
||||
{% macro frankensystem_fan_is_on() %}
|
||||
{% if state_attr('climate.thermostat', 'fan_mode') == 'on' or state_attr('climate.thermostat', 'hvac_action') != 'idle' %}
|
||||
{{ true }}
|
||||
{% else %}
|
||||
{{ false }}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro get_frankensystem_fan_percent() %}
|
||||
{% set fan_speed = 0 %}
|
||||
|
||||
{% if frankensystem_fan_is_on() %}
|
||||
{% if is_state('switch.fan_high', 'on') %}
|
||||
{% set fan_speed = 100 %}
|
||||
{% elif is_state('switch.fan_medium_high', 'on') %}
|
||||
{% set fan_speed = 75 %}
|
||||
{% elif is_state('switch.fan_medium_low', 'on') %}
|
||||
{% set fan_speed = 50 %}
|
||||
{% elif is_state('switch.fan_low', 'on') %}
|
||||
{% set fan_speed = 25 %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{{ fan_speed }}
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
{% macro get_active_fan_switch_id() %}
|
||||
{% if is_state('switch.fan_high', 'on') %}
|
||||
{{ "switch.fan_high" }}
|
||||
{% elif is_state('switch.fan_medium_high', 'on') %}
|
||||
{{ "switch.fan_medium_high" }}
|
||||
{% elif is_state('switch.fan_medium_low', 'on') %}
|
||||
{{ "switch.fan_medium_low" }}
|
||||
{% elif is_state('switch.fan_low', 'on') %}
|
||||
{{ "switch.fan_low" }}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
10
esphome/.gitignore
vendored
Normal file
10
esphome/.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# Gitignore settings for ESPHome
|
||||
# This is an example and may include too much for your use-case.
|
||||
# You can modify this file to suit your needs.
|
||||
/.esphome/
|
||||
**/.pioenvs/
|
||||
**/.piolibdeps/
|
||||
**/lib/
|
||||
**/src/
|
||||
**/platformio.ini
|
||||
/secrets.yaml
|
||||
94
esphome/damper-relay-1.yaml
Normal file
94
esphome/damper-relay-1.yaml
Normal file
@@ -0,0 +1,94 @@
|
||||
# change accordingly
|
||||
substitutions:
|
||||
# Device information
|
||||
devicename: damper-relay-controller-1
|
||||
upper_devicename: FrankenSystem Damper Relay Controller
|
||||
# Board / Pin Substitutions
|
||||
platform: ESP32
|
||||
board: nodemcu-32s
|
||||
# Relays
|
||||
relay1_pin: GPIO18
|
||||
relay2_pin: GPIO05
|
||||
relay3_pin: GPIO19
|
||||
relay4_pin: GPIO17
|
||||
relay5_pin: GPIO04
|
||||
relay6_pin: GPIO16
|
||||
relay7_pin: GPIO15
|
||||
relay8_pin: GPIO02
|
||||
|
||||
|
||||
esphome:
|
||||
name: $devicename
|
||||
#platform: $platform
|
||||
#board: $board
|
||||
|
||||
esp32:
|
||||
board: $board
|
||||
framework:
|
||||
type: arduino
|
||||
version: recommended
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
# level: VERY_VERBOSE
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
|
||||
ota:
|
||||
platform: esphome
|
||||
password: "c269bfc3d2544cbeef35ed32dcc937fb"
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "damper-relay-1 Fallback Hotspot"
|
||||
password: "ppGYrjrlUbw7"
|
||||
|
||||
#captive_portal:
|
||||
|
||||
# Enable MQTT Broker communications.
|
||||
mqtt:
|
||||
broker: !secret mqtt_broker
|
||||
username: !secret mqtt_username
|
||||
password: !secret mqtt_password
|
||||
topic_prefix: frankensystem
|
||||
discovery: true
|
||||
|
||||
switch:
|
||||
# 8 Channel Relay - 2
|
||||
- platform: gpio
|
||||
pin: $relay5_pin
|
||||
name: "Coil Damper - 1"
|
||||
|
||||
- platform: gpio
|
||||
pin: $relay3_pin
|
||||
name: "Coil Damper - 2"
|
||||
|
||||
- platform: gpio
|
||||
pin: $relay1_pin
|
||||
name: "Coil Damper - 3"
|
||||
|
||||
- platform: gpio
|
||||
pin: $relay2_pin
|
||||
name: "Bypass Damper - 1"
|
||||
|
||||
- platform: gpio
|
||||
pin: $relay4_pin
|
||||
name: "Bypass Damper - 2"
|
||||
|
||||
- platform: gpio
|
||||
pin: $relay6_pin
|
||||
name: "Spare - 1"
|
||||
|
||||
- platform: gpio
|
||||
pin: $relay7_pin
|
||||
name: "Spare - 2"
|
||||
|
||||
- platform: gpio
|
||||
pin: $relay8_pin
|
||||
name: "Spare - 3"
|
||||
|
||||
67
esphome/sensor-1.yaml
Normal file
67
esphome/sensor-1.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
esphome:
|
||||
name: sensor-1
|
||||
platform: ESP8266
|
||||
board: nodemcuv2
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
|
||||
ota:
|
||||
platform: esphome
|
||||
password: "bd2cc7a3c3bce9d1d088a52a3e730d4a"
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "Sensor-1 Fallback Hotspot"
|
||||
password: "S3h9aKPjGBH4"
|
||||
|
||||
# Enable MQTT Broker communications
|
||||
mqtt:
|
||||
broker: !secret mqtt_broker
|
||||
username: !secret mqtt_username
|
||||
password: !secret mqtt_password
|
||||
topic_prefix: frankensystem
|
||||
discovery: true
|
||||
|
||||
captive_portal:
|
||||
|
||||
sensor:
|
||||
|
||||
- platform: dht
|
||||
pin: D1
|
||||
temperature:
|
||||
name: "Post Coil Temperature"
|
||||
humidity:
|
||||
name: "Post Coil Humidity"
|
||||
update_interval: 5s
|
||||
|
||||
- platform: dht
|
||||
pin: D2
|
||||
temperature:
|
||||
name: "Return Temperature"
|
||||
humidity:
|
||||
name: "Return Humidity"
|
||||
update_interval: 5s
|
||||
|
||||
- platform: dht
|
||||
pin: D3
|
||||
temperature:
|
||||
name: "Mixed Air Temperature"
|
||||
humidity:
|
||||
name: "Mixed Air Humidity"
|
||||
update_interval: 5s
|
||||
|
||||
- platform: dht
|
||||
pin: D0
|
||||
temperature:
|
||||
name: "Supply Temperature"
|
||||
humidity:
|
||||
name: "Supply Humidity"
|
||||
update_interval: 5s
|
||||
100
esphome/system-relays.yaml
Normal file
100
esphome/system-relays.yaml
Normal file
@@ -0,0 +1,100 @@
|
||||
# change accordingly
|
||||
substitutions:
|
||||
# Device information
|
||||
devicename: system-relays
|
||||
upper_devicename: FrankenSystem System Relay Controller
|
||||
# Board / Pin Substitutions
|
||||
platform: ESP32
|
||||
board: nodemcu-32s
|
||||
# Relays
|
||||
relay1_pin: GPIO19
|
||||
relay2_pin: GPIO18
|
||||
relay3_pin: GPIO05
|
||||
relay4_pin: GPIO17
|
||||
relay5_pin: GPIO16
|
||||
relay6_pin: GPIO04
|
||||
relay7_pin: GPIO02
|
||||
relay8_pin: GPIO15
|
||||
|
||||
esphome:
|
||||
name: $devicename
|
||||
#platform: $platform
|
||||
#board: $board
|
||||
|
||||
esp32:
|
||||
board: $board
|
||||
framework:
|
||||
type: arduino
|
||||
version: recommended
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
level: VERY_VERBOSE
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
|
||||
ota:
|
||||
platform: esphome
|
||||
password: "c269bfc3d2544cbeef35ed32dcc937fb"
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
fast_connect: True
|
||||
power_save_mode: NONE
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
#ap:
|
||||
# ssid: "system-relays Fallback Hotspot"
|
||||
# password: "ppGYrjrlUbw7"
|
||||
|
||||
#captive_portal:
|
||||
|
||||
# Enable MQTT Broker communications.
|
||||
mqtt:
|
||||
broker: !secret mqtt_broker
|
||||
username: !secret mqtt_username
|
||||
password: !secret mqtt_password
|
||||
topic_prefix: frankensystem
|
||||
discovery: true
|
||||
|
||||
network:
|
||||
enable_ipv6: True
|
||||
|
||||
switch:
|
||||
# 8 Channel Relay - 2
|
||||
- platform: gpio
|
||||
pin: $relay4_pin
|
||||
name: "Fan Low"
|
||||
|
||||
- platform: gpio
|
||||
pin: $relay5_pin
|
||||
name: "Fan Medium Low"
|
||||
|
||||
- platform: gpio
|
||||
pin: $relay8_pin
|
||||
name: "Fan Medium High"
|
||||
|
||||
- platform: gpio
|
||||
pin: $relay7_pin
|
||||
name: "Fan High"
|
||||
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: $relay3_pin
|
||||
inverted: true
|
||||
name: "Dehumidification"
|
||||
|
||||
- platform: gpio
|
||||
pin: $relay1_pin
|
||||
name: "Humidification"
|
||||
|
||||
- platform: gpio
|
||||
pin: $relay2_pin
|
||||
name: "Reheat"
|
||||
|
||||
- platform: gpio
|
||||
pin: $relay6_pin
|
||||
name: "Cooling"
|
||||
|
||||
0
grafana.yaml
Normal file
0
grafana.yaml
Normal file
0
groups.yaml
Normal file
0
groups.yaml
Normal file
25
influxdb.yaml
Normal file
25
influxdb.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
api_version: 2
|
||||
ssl: true
|
||||
host: influxdb.frankensystem.dev
|
||||
port: 443
|
||||
token: !secret influxdb_token
|
||||
organization: 15d41366ef057eb5
|
||||
bucket: homeassistant
|
||||
tags:
|
||||
source: HA
|
||||
tags_attributes:
|
||||
- friendly_name
|
||||
default_measurement: units
|
||||
exclude:
|
||||
entities:
|
||||
- zone.home
|
||||
domains:
|
||||
- persistent_notification
|
||||
- person
|
||||
include:
|
||||
domains:
|
||||
- sensor
|
||||
- binary_sensor
|
||||
- sun
|
||||
entities:
|
||||
- weather.home
|
||||
72
packages/damper_relays.yaml
Normal file
72
packages/damper_relays.yaml
Normal file
@@ -0,0 +1,72 @@
|
||||
# Damper Relays Configuratoin
|
||||
#
|
||||
# These are customizations that are associated with the FrankenSystem damper relays.
|
||||
#
|
||||
#
|
||||
|
||||
switch:
|
||||
# Custom switch templates. These are so that dampers show an inverted state
|
||||
# in HomeAssistant, so they can be converted / shown as an open or closed valve.
|
||||
- platform: template
|
||||
switches:
|
||||
coil_damper_1_inverted:
|
||||
friendly_name: Coil Damper - 1
|
||||
unique_id: "damper_relays.coil_damper_1_inverted"
|
||||
value_template: "{{ is_state('switch.coil_damper_1_2', 'off') }}"
|
||||
turn_on:
|
||||
action: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.coil_damper_1_2
|
||||
turn_off:
|
||||
action: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.coil_damper_1_2
|
||||
coil_damper_2_inverted:
|
||||
friendly_name: Coil Damper - 2
|
||||
unique_id: "damper_relays.coil_damper_2_inverted"
|
||||
value_template: "{{ is_state('switch.coil_damper_2_2', 'off') }}"
|
||||
turn_on:
|
||||
action: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.coil_damper_2_2
|
||||
turn_off:
|
||||
action: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.coil_damper_2_2
|
||||
coil_damper_3_inverted:
|
||||
friendly_name: Coil Damper - 3
|
||||
unique_id: "damper_relays.coil_damper_3_inverted"
|
||||
value_template: "{{ is_state('switch.coil_damper_3_2', 'off') }}"
|
||||
turn_on:
|
||||
action: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.coil_damper_3_2
|
||||
turn_off:
|
||||
action: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.coil_damper_3_2
|
||||
bypass_damper_1_inverted:
|
||||
friendly_name: Bypass Damper - 1
|
||||
unique_id: "damper_relays.bypass_damper_1_inverted"
|
||||
value_template: "{{ is_state('switch.bypass_damper_1_2', 'off') }}"
|
||||
turn_on:
|
||||
action: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.bypass_damper_1_2
|
||||
turn_off:
|
||||
action: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.bypass_damper_1_2
|
||||
bypass_damper_2_inverted:
|
||||
friendly_name: Bypass Damper - 2
|
||||
unique_id: "damper_relays.bypass_damper_2_inverted"
|
||||
value_template: "{{ is_state('switch.bypass_damper_2_2', 'off') }}"
|
||||
turn_on:
|
||||
action: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.bypass_damper_2_2
|
||||
turn_off:
|
||||
action: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.bypass_damper_2_2
|
||||
|
||||
0
scenes.yaml
Normal file
0
scenes.yaml
Normal file
20
scripts.yaml
Normal file
20
scripts.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
set_frankensystem_fan_speed:
|
||||
alias: Set FrankenSystem Fan Speed
|
||||
sequence:
|
||||
- action: notify.notify
|
||||
metadata: {}
|
||||
data:
|
||||
message: '{{ this.speed }} was choosen.'
|
||||
fields:
|
||||
speed:
|
||||
selector:
|
||||
select:
|
||||
options:
|
||||
- High
|
||||
- Medium-High
|
||||
- Medium-Low
|
||||
- Low
|
||||
name: Speed
|
||||
description: Fan Speed
|
||||
required: true
|
||||
description: Set the fan speed on the FrankenSysten
|
||||
6
secrets.yaml
Normal file
6
secrets.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
# Use this file to store secrets like usernames and passwords.
|
||||
# Learn more at https://www.home-assistant.io/docs/configuration/secrets/
|
||||
wifi_ssid: HHE-Dev
|
||||
wifi_password: Mjh063079
|
||||
influxdb_token: R5d7mTR40Ne19qbSQui9lOf4mp7jW1BktS62PxSZgUUNQloRx2EBKlm6zCqCoTxz1ku6S9MppkA5CbDbnYWpGQ==
|
||||
72
sensors.yaml
Normal file
72
sensors.yaml
Normal file
@@ -0,0 +1,72 @@
|
||||
# Custom MQTT Sensor values.
|
||||
- platform: mqtt
|
||||
name: Mixed Air Dew Point
|
||||
state_topic: "frankensystem/sensor/mixed_air_dew_point/state"
|
||||
unit_of_measurement: "°F"
|
||||
value_template: "{{ value_json.temperature }}"
|
||||
payload_available: "online"
|
||||
payload_not_available: "offline"
|
||||
unique_id: "mixed_air_dew_point"
|
||||
|
||||
- platform: mqtt
|
||||
name: Mixed Air Enthalpy
|
||||
state_topic: "frankensystem/sensor/mixed_air_enthalpy/state"
|
||||
value_template: "{{ value_json.temperature }}"
|
||||
#unit_of_measurement: "°F"
|
||||
payload_available: "online"
|
||||
payload_not_available: "offline"
|
||||
unique_id: "mixed_air_enthalpy"
|
||||
|
||||
- platform: mqtt
|
||||
name: Post Coil Dew Point
|
||||
state_topic: "frankensystem/sensor/post_coil_dew_point/state"
|
||||
unit_of_measurement: "°F"
|
||||
value_template: "{{ value_json.temperature }}"
|
||||
payload_available: "online"
|
||||
payload_not_available: "offline"
|
||||
unique_id: "post_coil_dew_point"
|
||||
|
||||
- platform: mqtt
|
||||
name: Post Coil Enthalpy
|
||||
state_topic: "frankensystem/sensor/post_coil_enthalpy/state"
|
||||
value_template: "{{ value_json.temperature }}"
|
||||
#unit_of_measurement: "°F"
|
||||
payload_available: "online"
|
||||
payload_not_available: "offline"
|
||||
unique_id: "post_coil_enthalpy"
|
||||
|
||||
- platform: mqtt
|
||||
name: Return Dew Point
|
||||
state_topic: "frankensystem/sensor/return_dew_point/state"
|
||||
value_template: "{{ value_json.temperature }}"
|
||||
unit_of_measurement: "°F"
|
||||
payload_available: "online"
|
||||
payload_not_available: "offline"
|
||||
unique_id: "return_dew_point"
|
||||
|
||||
- platform: mqtt
|
||||
name: Return Enthalpy
|
||||
state_topic: "frankensystem/sensor/return_enthalpy/state"
|
||||
#unit_of_measurement: "°F"
|
||||
#value_template: "{{ value_json.temperature }}""
|
||||
payload_available: "online"
|
||||
payload_not_available: "offline"
|
||||
unique_id: "return_enthalpy"
|
||||
|
||||
- platform: mqtt
|
||||
name: Supply Dew Point
|
||||
state_topic: "frankensystem/sensor/supply_dew_point/state"
|
||||
unit_of_measurement: "°F"
|
||||
value_template: "{{ value_json.temperature }}"
|
||||
payload_available: "online"
|
||||
payload_not_available: "offline"
|
||||
unique_id: "supply_dew_point"
|
||||
|
||||
- platform: mqtt
|
||||
name: Supply Enthalpy
|
||||
state_topic: "frankensystem/sensor/supply_enthalpy/state"
|
||||
#unit_of_measurement: "°F"
|
||||
value_template: "{{ value_json.temperature }}"
|
||||
payload_available: "online"
|
||||
payload_not_available: "offline"
|
||||
unique_id: "supply_enthalpy"
|
||||
16
templates.yaml
Normal file
16
templates.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
# Templates
|
||||
|
||||
#- number:
|
||||
# - name: current_fan_speed
|
||||
# unique_id: current_fan_speed_template
|
||||
# state: {{ get_frankensystem_fan_percent() }}
|
||||
# set_value:
|
||||
# - service: number.set_value
|
||||
# target:
|
||||
# entity_id: number.automower # FIX ME
|
||||
# data:
|
||||
# value: {{ get_frankensystem_fan_percent() }}
|
||||
# step: 25
|
||||
# min: 0
|
||||
# max: 100
|
||||
# icon: mdi:fan
|
||||
Reference in New Issue
Block a user