diff --git a/automations/people/Clint/Clint_at_work.yaml b/automations/people/Clint/Clint_at_work.yaml index 50463df..181a36c 100644 --- a/automations/people/Clint/Clint_at_work.yaml +++ b/automations/people/Clint/Clint_at_work.yaml @@ -6,8 +6,6 @@ trigger: entity_id: device_tracker.pixel_7 to: "WMU" action: - - action: automation.turn_on - entity_id: automation.clint_home_after_work - action: input_text.set_value data: entity_id: input_text.person_clint diff --git a/automations/people/Clint/set_clint_next_alarm.yaml b/automations/people/Clint/set_clint_next_alarm.yaml index ca7ee74..c4360d3 100644 --- a/automations/people/Clint/set_clint_next_alarm.yaml +++ b/automations/people/Clint/set_clint_next_alarm.yaml @@ -1,42 +1,42 @@ -alias: Set Clint Next Alarm -id: automation_set_clint_next_alarm -#description: +# alias: Set Clint Next Alarm +# id: automation_set_clint_next_alarm +# #description: -trigger: - - platform: state - entity_id: binary_sensor.is_workday - to: "off" +# trigger: +# - platform: state +# entity_id: binary_sensor.is_workday +# to: "off" - - platform: state - entity_id: binary_sensor.is_workday - to: "on" +# - platform: state +# entity_id: binary_sensor.is_workday +# to: "on" - - platform: time - at: "01:00:00" +# - platform: time +# at: "01:00:00" - - platform: homeassistant - event: start +# - platform: homeassistant +# event: start -action: - - choose: - - conditions: - - condition: state - entity_id: binary_sensor.is_workday - state: "off" - sequence: - - action: input_datetime.set_datetime - target: - entity_id: input_datetime.clint_next_alarm - data: - time: "07:00:00" +# action: +# - choose: +# - conditions: +# - condition: state +# entity_id: binary_sensor.is_workday +# state: "off" +# sequence: +# - action: input_datetime.set_datetime +# target: +# entity_id: input_datetime.clint_next_alarm +# data: +# time: "07:00:00" - - conditions: - - condition: state - entity_id: binary_sensor.is_workday - state: "on" - sequence: - - action: input_datetime.set_datetime - target: - entity_id: input_datetime.clint_next_alarm - data: - time: "05:30:00" +# - conditions: +# - condition: state +# entity_id: binary_sensor.is_workday +# state: "on" +# sequence: +# - action: input_datetime.set_datetime +# target: +# entity_id: input_datetime.clint_next_alarm +# data: +# time: "05:45:00" diff --git a/automations/people/Clint/wake_clint.yaml b/automations/people/Clint/wake_clint.yaml index c50186d..7126e56 100644 --- a/automations/people/Clint/wake_clint.yaml +++ b/automations/people/Clint/wake_clint.yaml @@ -21,25 +21,21 @@ action: - action: media_player.volume_set data: - entity_id: media_player.home_assistant_voice_097b44_media_player + entity_id: media_player.ma_home_assistant_voice_097b44_media_player volume_level: 0.50 - - choose: - - conditions: - - condition: state - entity_id: input_select.master_bedroom_mode - state: "off" - sequence: - - action: input_select.select_option - data: - option: Energize - target: - entity_id: input_select.master_bedroom_mode - - action: input_select.select_option data: option: Energize target: entity_id: input_select.master_bedroom_mode - - action: script.wake_up_the_master_bedroom + - action: music_assistant.play_media + target: + entity_id: media_player.ma_home_assistant_voice_097b44_media_player + data: + media_type: playlist + media_id: library://playlist/32 + enqueue: replace + + - action: script.wake_the_bedroom diff --git a/automations/people/bedtime_something_open.yaml b/automations/people/bedtime_something_open.yaml index 5a3087a..47e0f75 100644 --- a/automations/people/bedtime_something_open.yaml +++ b/automations/people/bedtime_something_open.yaml @@ -24,13 +24,12 @@ action: - action: media_player.volume_set data_template: volume_level: 0.30 - entity_id: media_player.home_assistant_voice_097b44_media_player + entity_id: media_player.ma_home_assistant_voice_097b44_media_player - action: tts.speak target: entity_id: tts.google_translate_en_com data: - media_player_entity_id: media_player.home_assistant_voice_097b44_media_player + media_player_entity_id: media_player.ma_home_assistant_voice_097b44_media_player message: >- The following are open: {{ dict((states|selectattr('entity_id', 'in', state_attr('group.my_exterior_windows', 'entity_id') + state_attr('group.my_exterior_doors', 'entity_id'))|list)|groupby('state'))['on']|map(attribute='name')|list|join(', ') }} - diff --git a/automations/people/goodnight_kids.yaml b/automations/people/goodnight_kids.yaml index 12ef1a5..5ab1f18 100644 --- a/automations/people/goodnight_kids.yaml +++ b/automations/people/goodnight_kids.yaml @@ -153,6 +153,11 @@ action: - choose: - conditions: "{{is_state('input_boolean.bridget_home','on')}}" sequence: + - action: input_boolean.turn_on + data: {} + target: + entity_id: input_boolean.girls_room_asleep + - action: input_button.press data: {} target: diff --git a/automations/rooms/master_bedroom/continue_white_noise.yaml b/automations/rooms/master_bedroom/continue_white_noise.yaml index d3cfa8a..ce12648 100644 --- a/automations/rooms/master_bedroom/continue_white_noise.yaml +++ b/automations/rooms/master_bedroom/continue_white_noise.yaml @@ -3,11 +3,11 @@ id: automation_continue_white_noise initial_state: "on" trigger: - platform: state - entity_id: media_player.home_assistant_voice_097b44_media_player + entity_id: media_player.ma_home_assistant_voice_097b44_media_player to: "off" for: "00:00:02" - platform: state - entity_id: media_player.home_assistant_voice_097b44_media_player + entity_id: media_player.ma_home_assistant_voice_097b44_media_player to: "idle" for: "00:00:02" condition: diff --git a/automations/rooms/master_bedroom/master_bedroom_white_noise_off.yaml b/automations/rooms/master_bedroom/master_bedroom_white_noise_off.yaml index 63febfb..f0493a9 100644 --- a/automations/rooms/master_bedroom/master_bedroom_white_noise_off.yaml +++ b/automations/rooms/master_bedroom/master_bedroom_white_noise_off.yaml @@ -10,5 +10,4 @@ action: - action: media_player.turn_off data: {} target: - entity_id: media_player.home_assistant_voice_097b44_media_player - + entity_id: media_player.ma_home_assistant_voice_097b44_media_player diff --git a/automations/rooms/master_bedroom/master_bedroom_white_noise_on.yaml b/automations/rooms/master_bedroom/master_bedroom_white_noise_on.yaml index b5e27f8..a33a910 100644 --- a/automations/rooms/master_bedroom/master_bedroom_white_noise_on.yaml +++ b/automations/rooms/master_bedroom/master_bedroom_white_noise_on.yaml @@ -32,11 +32,10 @@ action: # data: # shuffle: false # target: - # entity_id: media_player.home_assistant_voice_097b44_media_player + # entity_id: media_player.ma_home_assistant_voice_097b44_media_player # - action: media_player.repeat_set # metadata: {} # data: # repeat: "all" # target: - # entity_id: media_player.home_assistant_voice_097b44_media_player - + # entity_id: media_player.ma_home_assistant_voice_097b44_media_player diff --git a/automations/things/keurig_done.yaml b/automations/things/keurig_done.yaml index 6eb68d1..50e6cc8 100644 --- a/automations/things/keurig_done.yaml +++ b/automations/things/keurig_done.yaml @@ -47,9 +47,6 @@ action: entity_id: input_boolean.kids_bedtime state: "on" - - condition: state - entity_id: media_player.ytube_music_player - state: "playing" sequence: - alias: "Announce that the coffee is ready" action: script.make_clever_announcement diff --git a/components/binary_sensors/rooms/nursery_occupied.yaml b/components/binary_sensors/rooms/nursery_occupied.yaml index 20db02b..e887495 100644 --- a/components/binary_sensors/rooms/nursery_occupied.yaml +++ b/components/binary_sensors/rooms/nursery_occupied.yaml @@ -6,7 +6,7 @@ prior: 0.25 probability_threshold: 0.90 observations: - platform: state - entity_id: group.nursery_motion + entity_id: binary_sensor.girls_room_motion to_state: "on" prob_given_true: .33 prob_given_false: 0.0 diff --git a/components/packages/ambientsounds.yaml b/components/packages/ambientsounds.yaml index 3d6e393..54bb5da 100644 --- a/components/packages/ambientsounds.yaml +++ b/components/packages/ambientsounds.yaml @@ -31,7 +31,7 @@ group: - media_player.girls_room_hub - media_player.boys_room_clock - media_player.bathroom_mini - - media_player.home_assistant_voice_097b44_media_player + - media_player.ma_home_assistant_voice_097b44_media_player - media_player.computer_area_hub ###### INPUT SELECT ------------------------------------------ @@ -98,7 +98,7 @@ script: data_template: entity_id: > {% if is_state("input_select.google_home", "Front Room") %} media_player.front_room_hub - {% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.home_assistant_voice_097b44_media_player + {% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.ma_home_assistant_voice_097b44_media_player {% elif is_state("input_select.google_home", "Master Bathroom") %} media_player.great_room {% elif is_state("input_select.google_home", "Kitchen") %} media_player.kitchen {% elif is_state("input_select.google_home", "Girls Room") %} media_player.girls_room_hub @@ -113,7 +113,7 @@ script: data_template: entity_id: > {% if is_state("input_select.google_home", "Front Room") %} media_player.front_room_hub - {% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.home_assistant_voice_097b44_media_player + {% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.ma_home_assistant_voice_097b44_media_player {% elif is_state("input_select.google_home", "Master Bathroom") %} media_player.great_room {% elif is_state("input_select.google_home", "Kitchen") %} media_player.kitchen {% elif is_state("input_select.google_home", "Girls Room") %} media_player.girls_room_hub @@ -162,7 +162,7 @@ script: data_template: entity_id: > {% if is_state("input_select.google_home", "Front Room") %} media_player.front_room_hub - {% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.home_assistant_voice_097b44_media_player + {% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.ma_home_assistant_voice_097b44_media_player {% elif is_state("input_select.google_home", "Master Bathroom") %} media_player.great_room {% elif is_state("input_select.google_home", "Kitchen") %} media_player.kitchen {% elif is_state("input_select.google_home", "Girls Room") %} media_player.girls_room_hub @@ -188,7 +188,7 @@ automation: data_template: entity_id: > {% if is_state("input_select.google_home", "Front Room") %} media_player.front_room_hub - {% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.home_assistant_voice_097b44_media_player + {% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.ma_home_assistant_voice_097b44_media_player {% elif is_state("input_select.google_home", "Master Bathroom") %} media_player.great_room {% elif is_state("input_select.google_home", "Kitchen") %} media_player.kitchen {% elif is_state("input_select.google_home", "Girls Room") %} media_player.girls_room_hub diff --git a/components/packages/hygrostats.yaml b/components/packages/hygrostats.yaml index 8da7ed4..0b3603d 100644 --- a/components/packages/hygrostats.yaml +++ b/components/packages/hygrostats.yaml @@ -1,7 +1,7 @@ binary_sensor: - platform: generic_hygrostat name: Master Bathroom Hygrostat - sensor: sensor.master_bathroom_thermostat_humidity # Source humidity sensor + sensor: sensor.bathroom_multisensor_relative_humidity # Source humidity sensor #attribute: humidity # Optional use sensor attribute instead of state. delta_trigger: 3 # Optional humidity swing to detect. Default = 3 target_offset: 10 # Optional dehumidification target offset. Default = 3 diff --git a/components/packages/mariadb_queries.yaml b/components/packages/mariadb_queries.yaml new file mode 100644 index 0000000..cdb75a2 --- /dev/null +++ b/components/packages/mariadb_queries.yaml @@ -0,0 +1,139 @@ +# sql: +# # MariaDB Status +# - name: "MariaDB Status" +# query: >- +# SELECT 'running' as status +# FROM information_schema.GLOBAL_STATUS +# WHERE VARIABLE_NAME = 'Uptime' +# AND CAST(VARIABLE_VALUE AS UNSIGNED) > 0; +# column: "status" +# value_template: "{{ value if value else 'stopped' }}" + +# # MariaDB Version +# - name: "MariaDB Version" +# query: >- +# SELECT @@version as version; +# column: "version" + +# # MariaDB Performance +# - name: "MariaDB Performance" +# query: >- +# SELECT CONCAT( +# ROUND( +# (SELECT VARIABLE_VALUE +# FROM information_schema.GLOBAL_STATUS +# WHERE VARIABLE_NAME = 'Queries') / +# (SELECT VARIABLE_VALUE +# FROM information_schema.GLOBAL_STATUS +# WHERE VARIABLE_NAME = 'Uptime') +# ), ' q/s') as performance; +# column: "performance" + +# # Database size +# - name: "Database Size" +# query: >- +# SELECT ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) as size +# FROM information_schema.tables +# WHERE table_schema = 'HassDatabase'; +# column: "size" +# unit_of_measurement: "MB" +# value_template: "{{ value | float }}" + +# # Table count +# - name: "Database Tables Count" +# query: >- +# SELECT COUNT(*) as count +# FROM information_schema.tables +# WHERE table_schema = 'HassDatabase'; +# column: "count" +# unit_of_measurement: "tables" + +# # Total records +# - name: "Database Total Records" +# query: >- +# SELECT COUNT(*) as count +# FROM states; +# column: "count" +# unit_of_measurement: "records" + +# # MariaDB uptime +# - name: "MariaDB Uptime" +# query: >- +# SELECT VARIABLE_VALUE as value +# FROM information_schema.GLOBAL_STATUS +# WHERE VARIABLE_NAME = 'Uptime'; +# column: "value" +# unit_of_measurement: "seconds" + +# # Active connections +# - name: "MariaDB Connections" +# query: >- +# SELECT VARIABLE_VALUE as value +# FROM information_schema.GLOBAL_STATUS +# WHERE VARIABLE_NAME = 'Threads_connected'; +# column: "value" +# unit_of_measurement: "connections" + +# # Total queries +# - name: "MariaDB Questions" +# query: >- +# SELECT VARIABLE_VALUE as value +# FROM information_schema.GLOBAL_STATUS +# WHERE VARIABLE_NAME = 'Questions'; +# column: "value" +# unit_of_measurement: "queries" + +# # MariaDB Buffer Pool Size +# - name: "MariaDB Buffer Pool Size" +# query: >- +# SELECT CONCAT(ROUND(@@innodb_buffer_pool_size/1024/1024/1024, 1), ' GB') as value; +# column: "value" + +# # MariaDB Max Connections +# - name: "MariaDB Max Connections" +# query: >- +# SELECT @@max_connections as value; +# column: "value" + +# # MariaDB InnoDB Log File Size +# - name: "MariaDB Log File Size" +# query: >- +# SELECT CONCAT(ROUND(@@innodb_log_file_size/1024/1024, 0), ' MB') as value; +# column: "value" + +# # MariaDB Tmp Table Size +# - name: "MariaDB Tmp Table Size" +# query: >- +# SELECT CONCAT(ROUND(@@tmp_table_size/1024/1024, 0), ' MB') as value; +# column: "value" + +# # MariaDB IO Capacity +# - name: "MariaDB IO Capacity" +# query: >- +# SELECT @@innodb_io_capacity as value; +# column: "value" + +# # MariaDB IO Threads +# - name: "MariaDB IO Threads" +# query: >- +# SELECT CONCAT( +# 'Read: ', @@innodb_read_io_threads, +# ', Write: ', @@innodb_write_io_threads +# ) as value; +# column: "value" + +# # MariaDB Table Cache +# - name: "MariaDB Table Cache" +# query: >- +# SELECT @@table_open_cache as value; +# column: "value" + +# # MariaDB Buffer Sizes +# - name: "MariaDB Buffer Sizes" +# query: >- +# SELECT CONCAT( +# 'Sort: ', ROUND(@@sort_buffer_size/1024/1024, 0), 'M, ', +# 'Read: ', ROUND(@@read_buffer_size/1024/1024, 0), 'M, ', +# 'Join: ', ROUND(@@join_buffer_size/1024/1024, 0), 'M' +# ) as value; +# column: "value" \ No newline at end of file diff --git a/components/sensors/template.yaml b/components/sensors/template.yaml index 7fba4bd..12310fc 100644 --- a/components/sensors/template.yaml +++ b/components/sensors/template.yaml @@ -222,12 +222,6 @@ sensors: value_template: "{{ (expand('group.my_exterior_windows') | selectattr('state', 'eq', 'on')) | list | count |int(default=0) }}" icon_template: "{{ iif(is_state('group.my_exterior_windows', 'on'), 'mdi:window-open-variant','mdi:window-closed-variant') }}" - lights_left_on_count: - unique_id: temlatesensor.lights_left_on_count - friendly_name: Lights Left On - value_template: "{{ (expand('group.lights_left_on') | selectattr('state', 'eq', 'on')) | list | count |int(default=0) }}" - icon_template: "{{ iif(is_state('group.lights_left_on', 'on'), 'mdi:lightbulb-multiple','mdi:lightbulb-multiple-off') }}" - open_external_doors_count: unique_id: temlatesensor.open_external_doors_count friendly_name: Open External Doors diff --git a/components/timers/lights.yaml b/components/timers/lights.yaml deleted file mode 100644 index b86ac7a..0000000 --- a/components/timers/lights.yaml +++ /dev/null @@ -1,53 +0,0 @@ -# front_room_lights: -# duration: '00:05:00' - -# kitchen_lights: -# duration: '00:05:00' - -# dining_room_lights: -# duration: '00:05:00' - -# entryway_lights: -# duration: '00:05:00' - -# nursery_lights: -# duration: '00:05:00' - -# nursery_closet_lights: -# duration: '00:05:00' - -# master_bathroom_lights: -# duration: '00:05:00' - -# master_bedroom_lights: -# duration: '00:05:00' - -# master_bedroom_closet_lights: -# duration: '00:05:00' - -# garage_lights: -# duration: '00:05:00' - -# computer_area_lights: -# duration: '00:05:00' - -# great_room_lights: -# duration: '00:05:00' - -# storage_room_lights: -# duration: '00:05:00' - -# utility_room_lights: -# duration: '00:05:00' - -# mancave_lights: -# duration: '00:05:00' - -# boys_room_lights: -# duration: '00:05:00' - -# boys_room_closet_lights: -# duration: '00:05:00' - -# furnace_room_lights: -# duration: '00:05:00' \ No newline at end of file diff --git a/components/timers/nursery_camera.yaml b/components/timers/nursery_camera.yaml deleted file mode 100644 index 3baf6be..0000000 --- a/components/timers/nursery_camera.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# nursery_camera_on_hub: -# duration: '00:10:00' - -# nursery_camera_on_tv: -# duration: '00:10:00' \ No newline at end of file diff --git a/customizations/entities/doors.yaml b/customizations/entities/doors.yaml index 4427882..0abacac 100644 --- a/customizations/entities/doors.yaml +++ b/customizations/entities/doors.yaml @@ -1,6 +1,3 @@ -group.nursery_doors: - icon: mdi:door - group.master_bedroom_doors: icon: mdi:door diff --git a/esphome/bathroom-multisensor.yaml b/esphome/bathroom-multisensor.yaml new file mode 100644 index 0000000..3bd1a1a --- /dev/null +++ b/esphome/bathroom-multisensor.yaml @@ -0,0 +1,235 @@ +substitutions: + devicename: bathroom-multisensor + entity_name: bathroom_multisensor + friendly_name: Bathroom MultiSensor + comment: Clever MultiSensor + platform: ESP8266 + board: nodemcu + static_ip: !secret bathroom-multisensor-ip + +packages: + network: !include common/wifi.yaml + device_base: !include common/device_base.yaml + +esphome: + name: ${devicename} + friendly_name: ${friendly_name} + name_add_mac_suffix: false + +esp8266: + board: ${board} + +# Enable logging +logger: + #level: VERBOSE + +web_server: + port: 80 + version: 3 + include_internal: True + +i2c: + - id: bus_a + sda: D2 + scl: D1 + +bme680_bsec: + i2c_id: bus_a + + # i2c address + # ----------- + # Common values are: + # - 0x76 + # - 0x77 + # Default: 0x76 + address: 0x77 + + # Temperature offset + # ------------------ + # Useful if device is in enclosure and reads too high + # Default: 0 + temperature_offset: 0 + + # IAQ calculation mode + # -------------------- + # Available options: + # - static (for fixed position devices) + # - mobile (for on person or other moveable devices) + # Default: static + iaq_mode: static + + # Sample rate + # ----------- + # This controls the sampling rate for gas-dependant sensors and will govern the interval + # at which the sensor heater is operated. + # By default this rate will also be used for temperature, pressure and humidity sensors + # but these can be overridden on a per-sensor level if required. + # + # Available options: + # - lp (low power - samples every 3 seconds) + # - ulp (ultra low power - samples every 5 minutes) + # Default: lp + sample_rate: lp + + # Interval at which to save BSEC state + # ------------------------------------ + # Default: 6h + state_save_interval: 6h + +sensor: + # - platform: bme680 + # i2c_id: bus_a + # address: 0x77 + # update_interval: 3s + # temperature: + # name: "Standard Temperature" + # oversampling: 16x + # device_class: temperature + # unit_of_measurement: "°C" + # web_server: + # sorting_weight: 10 + # pressure: + # name: "Standard Pressure" + # device_class: atmospheric_pressure + # unit_of_measurement: hPa + # web_server: + # sorting_weight: 20 + # humidity: + # id: "humidity" + # name: "Standard Humidity" + # device_class: humidity + # unit_of_measurement: "%" + # web_server: + # sorting_weight: 30 + # gas_resistance: + # id: "gas_resistance" + # name: "Standard Gas Resistance" + # unit_of_measurement: "Ω" + # web_server: + # sorting_weight: 40 + + # - platform: template + # name: "Standard Indoor Air Quality" + # id: iaq + # icon: "mdi:gauge" + # # calculation: comp_gas = log(R_gas[ohm]) + 0.04 log(Ohm)/%rh * hum[%rh] + # lambda: |- + # return log(id(gas_resistance).state) + 0.04 * id(humidity).state; + # state_class: "measurement" + # web_server: + # sorting_weight: 50 + + - platform: bme680_bsec + temperature: + # Temperature in °C + name: "Temperature" + id: temp + sample_rate: lp + unit_of_measurement: "°C" + web_server: + sorting_weight: 11 + filters: + - median + pressure: + # Pressure in hPa + name: "Pressure" + id: pressure + sample_rate: lp + unit_of_measurement: "hPa" + web_server: + sorting_weight: 21 + filters: + - median + humidity: + # Relative humidity % + id: humidity + name: "Relative Humidity" + sample_rate: lp + unit_of_measurement: "%" + web_server: + sorting_weight: 31 + filters: + - median + gas_resistance: + # Gas resistance in Ω + name: "Gas Resistance" + id: gas_resistance + unit_of_measurement: "Ω" + disabled_by_default: True + web_server: + sorting_weight: 41 + filters: + - median + iaq: + # Indoor air quality value + name: "Air Quality Index" + unit_of_measurement: "AQI" + id: iaq + web_server: + sorting_weight: 51 + filters: + - median + iaq_accuracy: + # IAQ accuracy as a numeric value of 0, 1, 2, 3 + name: "Numeric IAQ Accuracy" + id: iaq_accuracy + disabled_by_default: True + web_server: + sorting_weight: 71 + co2_equivalent: + # CO2 equivalent estimate in ppm + name: "CO2 Equivalent" + id: co2 + unit_of_measurement: "ppm" + web_server: + sorting_weight: 81 + filters: + - median + breath_voc_equivalent: + # Volatile organic compounds equivalent estimate in ppm + name: "Breath VOC Equivalent" + id: breath_voc + unit_of_measurement: "ppm" + web_server: + sorting_weight: 91 + filters: + - median + +text_sensor: + - platform: template + name: "IAQ Classification" + icon: "mdi:checkbox-marked-circle-outline" + web_server: + sorting_weight: 60 + lambda: |- + if (int(id(iaq).state) <= 50) { + return {"Excellent"}; + } + else if (int(id(iaq).state) <= 100) { + return {"Good"}; + } + else if (int(id(iaq).state) <= 150) { + return {"Lightly polluted"}; + } + else if (int(id(iaq).state) <= 200) { + return {"Moderately polluted"}; + } + else if (int(id(iaq).state) <= 250) { + return {"Heavily polluted"}; + } + else if (int(id(iaq).state) <= 350) { + return {"Severely polluted"}; + } + else if (int(id(iaq).state) <= 500) { + return {"Extremely polluted"}; + } + else { + return {"unknown"}; + } + + - platform: bme680_bsec + iaq_accuracy: + # IAQ accuracy as a text value of Stabilizing, Uncertain, Calibrating, Calibrated + name: "AQI Accuracy" + web_server: + sorting_weight: 61 \ No newline at end of file diff --git a/esphome/common/water_flow_sensor.yaml b/esphome/common/water_flow_sensor.yaml new file mode 100644 index 0000000..e812da5 --- /dev/null +++ b/esphome/common/water_flow_sensor.yaml @@ -0,0 +1,24 @@ +# Specifications: +# Working range: 1-25L/min +# Max water pressure: 1.75Mpa +# F=11Q(L/min) +# Working Voltage Range: DC5-15V +# Accuracy:±3% +# Temperature sensor: NTC 3950 R25=50K +# Male Thread External Diameter:20.5mm(0.8 inch) +# Tube Length:65mm(2.56 inch) +# Cable Length:30cm(11.81 inch) +# Temperature Sensor Length:16mm(0.63 inch) +# Size:65mm*30mm*28mm(L*W*H) + +# Package Include: +# Flow meter x 1 + + sensor: + - platform: pulse_counter + pin: GPIO5 + name: "Pulse Counter" + update_interval: 5s + filters: + - lambda: return (x / 11.0) * 60.0; + unit_of_measurement: "L/hr" \ No newline at end of file diff --git a/esphome/common/waveshare_esp32_s3_eth_poe.yaml b/esphome/common/waveshare_esp32_s3_eth_poe.yaml new file mode 100644 index 0000000..98b09f1 --- /dev/null +++ b/esphome/common/waveshare_esp32_s3_eth_poe.yaml @@ -0,0 +1,27 @@ +esp32: + board: esp32-s3 + framework: + #type: arduino + type: esp-idf + +ethernet: + id: eth + type: W5500 + clk_pin: GPIO13 + mosi_pin: GPIO11 + miso_pin: GPIO12 + cs_pin: GPIO14 + interrupt_pin: GPIO10 + reset_pin: GPIO9 + + use_address: ${devicename}.local + + manual_ip: + static_ip: ${static_ip} + gateway: !secret iot_default_gateway + subnet: !secret iot_subnet_mask + dns1: !secret iot_default_dns1 + dns2: !secret iot_default_dns2 + +text_sensor: + - <<: !include text_sensor/ethernet_info.config.yaml \ No newline at end of file diff --git a/esphome/utility-room-multisensor.yaml b/esphome/utility-room-multisensor.yaml index a66a1c6..d75f05c 100644 --- a/esphome/utility-room-multisensor.yaml +++ b/esphome/utility-room-multisensor.yaml @@ -4,7 +4,7 @@ substitutions: friendly_name: Utility Room MultiSensor comment: Clever MultiSensor platform: ESP8266 - board: d1_mini + board: nodemcu static_ip: !secret utility-room-multisensor-ip packages: @@ -30,8 +30,8 @@ web_server: i2c: - id: bus_a - sda: D2 - scl: D1 + sda: D6 + scl: D5 bme680_bsec: i2c_id: bus_a diff --git a/groups.yaml b/groups.yaml index f54b967..4177ee5 100644 --- a/groups.yaml +++ b/groups.yaml @@ -116,19 +116,19 @@ great_room_motion: - binary_sensor.great_room_multisensor_home_security_motion_detection - binary_sensor.everything_presence_lite_8fa4fc_occupancy -nursery_doors: - icon: hass:door - name: Nursery Doors - entities: - - binary_sensor.nursery_door - - binary_sensor.nursery_closet_door_contact +# nursery_doors: +# icon: hass:door +# name: Nursery Doors +# entities: +# - binary_sensor.nursery_door +# - binary_sensor.nursery_closet_door_contact -nursery_motion: - icon: mdi:motion-sensor - name: Nursery Motion - entities: - - binary_sensor.nursery_multisensor_home_security_motion_detection # The Aeotech - - binary_sensor.nursery_closet_motion_switch_home_security_motion_detection +# nursery_motion: +# icon: mdi:motion-sensor +# name: Nursery Motion +# entities: +# - binary_sensor.nursery_multisensor_home_security_motion_detection # The Aeotech +# - binary_sensor.nursery_closet_motion_switch_home_security_motion_detection master_bedroom_motion: icon: mdi:motion-sensor @@ -408,24 +408,3 @@ all_my_speakers: - media_player.garage - media_player.boys_room_clock -lights_left_on: - name: Lights Left On - icon: mdi:lightbulb-multiple - entities: - - binary_sensor.front_room_light_left_on - - binary_sensor.computer_area_light_left_on - - binary_sensor.nursery_light_left_on - - binary_sensor.kitchen_light_left_on - - binary_sensor.master_bathroom_light_left_on - - binary_sensor.dining_room_light_left_on - - binary_sensor.entryway_light_left_on - - binary_sensor.great_room_light_left_on - - binary_sensor.utility_room_light_left_on - - binary_sensor.master_bedroom_light_left_on - - binary_sensor.garage_light_left_on - - binary_sensor.front_yard_light_left_on - - binary_sensor.mancave_light_left_on - - binary_sensor.boys_room_light_left_on - - binary_sensor.furnace_room_light_left_on - - binary_sensor.storage_room_light_left_on - - binary_sensor.back_yard_light_left_on diff --git a/lovelace/cameras/view-camera-08.yaml b/lovelace/cameras/view-camera-08.yaml index bf7b428..df65a9c 100644 --- a/lovelace/cameras/view-camera-08.yaml +++ b/lovelace/cameras/view-camera-08.yaml @@ -69,7 +69,7 @@ card: opacity: 0% - type: state-icon - entity: group.nursery_motion + entity: binary_sensor.girls_room_motion style: left: 8% top: 95% diff --git a/lovelace/phone/girls-room.yaml b/lovelace/phone/girls-room.yaml index a4a3604..0dae70b 100644 --- a/lovelace/phone/girls-room.yaml +++ b/lovelace/phone/girls-room.yaml @@ -342,7 +342,7 @@ cards: - type: horizontal-stack cards: - type: custom:mushroom-entity-card - entity: group.nursery_motion + entity: binary_sensor.girls_room_motion name: Motion secondary_info: none layout: vertical diff --git a/lovelace/phone/home.yaml b/lovelace/phone/home.yaml index 32065bd..4f618af 100644 --- a/lovelace/phone/home.yaml +++ b/lovelace/phone/home.yaml @@ -27,7 +27,7 @@ cards: navigation_path: /phone-yaml/plants - type: template - entity: group.lights_left_on + entity: binary_sensor.lights_left_on icon: > {% if states('sensor.lights_left_on_count') | int(default=0) > 0 -%} mdi:lightbulb-on diff --git a/lovelace/phone/master-bathroom.yaml b/lovelace/phone/master-bathroom.yaml index e45c450..d61da51 100644 --- a/lovelace/phone/master-bathroom.yaml +++ b/lovelace/phone/master-bathroom.yaml @@ -9,6 +9,20 @@ cards: # - type: custom:mushroom-chips-card # chips: # - type: back + - type: horizontal-stack + cards: + - hours_to_show: 24 + graph: line + type: sensor + entity: sensor.bathroom_multisensor_temperature + detail: 1 + name: Multisensor + - hours_to_show: 24 + graph: line + type: sensor + detail: 1 + entity: sensor.bathroom_multisensor_relative_humidity + name: Multisensor - type: horizontal-stack cards: - hours_to_show: 24 @@ -16,13 +30,26 @@ cards: type: sensor entity: sensor.master_bathroom_thermostat_temperature detail: 1 - name: Temperature + name: Thermostat - hours_to_show: 24 graph: line type: sensor detail: 1 entity: sensor.master_bathroom_thermostat_humidity - name: Humidity + name: Thermostat + - type: horizontal-stack + cards: + - hours_to_show: 24 + graph: line + type: sensor + entity: sensor.master_bathroom_thermal_comfort_summer_simmer_index + detail: 1 + name: Simmer + - type: history-graph + entities: + - entity: binary_sensor.master_bathroom_hygrostat + name: Hygrostat + hours_to_show: 24 - type: vertical-stack cards: - type: custom:mushroom-title-card diff --git a/lovelace/phone/utility-room.yaml b/lovelace/phone/utility-room.yaml index 61ea672..9dec3ba 100644 --- a/lovelace/phone/utility-room.yaml +++ b/lovelace/phone/utility-room.yaml @@ -9,6 +9,20 @@ cards: # - type: custom:mushroom-chips-card # chips: # - type: back + - type: horizontal-stack + cards: + - hours_to_show: 24 + graph: line + type: sensor + entity: sensor.utility_room_multisensor_temperature + detail: 1 + name: Multisensor + - hours_to_show: 24 + graph: line + type: sensor + detail: 1 + entity: sensor.utility_room_multisensor_relative_humidity + name: Multisensor - type: horizontal-stack cards: - hours_to_show: 24 @@ -16,13 +30,26 @@ cards: type: sensor entity: sensor.utility_room_thermostat_temperature detail: 1 - name: Temperature + name: Thermostat - hours_to_show: 24 graph: line type: sensor detail: 1 entity: sensor.utility_room_thermostat_humidity - name: Humidity + name: Thermostat + - type: horizontal-stack + cards: + - hours_to_show: 24 + graph: line + type: sensor + entity: sensor.utility_room_thermal_comfort_summer_simmer_index + detail: 1 + name: Simmer + - type: history-graph + entities: + - entity: binary_sensor.utility_room_hygrostat + name: Hygrostat + hours_to_show: 24 - type: vertical-stack cards: - type: custom:mushroom-title-card diff --git a/lovelace/raw-cameras/indoor-camera-card.yaml b/lovelace/raw-cameras/indoor-camera-card.yaml index 8c4a551..1df9e39 100644 --- a/lovelace/raw-cameras/indoor-camera-card.yaml +++ b/lovelace/raw-cameras/indoor-camera-card.yaml @@ -11,7 +11,7 @@ cameras: occupancy: false motion: false entities: - - group.nursery_motion + - binary_sensor.girls_room_motion - binary_sensor.bridgets_bed - camera_entity: camera.frigate_cam01 title: Boys Room diff --git a/lovelace/room_cards/girls_room.yaml b/lovelace/room_cards/girls_room.yaml index 0d3cdb8..97d2af0 100644 --- a/lovelace/room_cards/girls_room.yaml +++ b/lovelace/room_cards/girls_room.yaml @@ -51,7 +51,7 @@ elements: top: 9% #top left icon #2 spot # - type: state-icon - # entity: group.nursery_motion + # entity: binary_sensor.girls_room_motion # style: # left: 52% # top: 9% diff --git a/lovelace/view-automations_clint.yaml b/lovelace/view-automations_clint.yaml index 9034971..bdea7e7 100644 --- a/lovelace/view-automations_clint.yaml +++ b/lovelace/view-automations_clint.yaml @@ -25,8 +25,6 @@ cards: secondary_info: last-triggered - entity: automation.clint_home secondary_info: last-triggered - - entity: automation.clint_home_after_work - secondary_info: last-triggered - entity: automation.clint_up secondary_info: last-triggered - entity: automation.clint_awake diff --git a/lovelace/view-charts.yaml b/lovelace/view-charts.yaml index 298fa0b..a03bf99 100644 --- a/lovelace/view-charts.yaml +++ b/lovelace/view-charts.yaml @@ -88,19 +88,91 @@ cards: points_per_hour: 3 show: fill: false - - - type: custom:mini-graph-card - align_icon: left - align_state: center - entities: - - sensor.local_mariadb_database_size - font_size: 50 - icon: mdi:database - name: Database - hours_to_show: 96 - points_per_hour: 3 - show: - fill: false + # - type: vertical-stack + # cards: + # - type: entities + # title: Database Statistics + # entities: + # - entity: sensor.database_size + # name: Database Size + # icon: mdi:database + # - entity: sensor.database_tables_count + # name: Number of Tables + # icon: mdi:table + # - entity: sensor.database_total_records + # name: Total Records + # icon: mdi:counter + # - type: entities + # title: MariaDB Status + # entities: + # - entity: sensor.mariadb_status + # name: Server Status + # icon: mdi:database + # - entity: sensor.mariadb_version_2 + # name: Version + # icon: mdi:database-check + # - entity: sensor.mariadb_performance + # name: Performance + # icon: mdi:chart-line + # - entity: sensor.mariadb_uptime + # name: Uptime + # icon: mdi:timer-outline + # - entity: sensor.mariadb_connections + # name: Active Connections + # icon: mdi:connection + # - entity: sensor.mariadb_questions + # name: Total Queries + # icon: mdi:database-search + # - type: grid + # cards: + # - type: custom:mushroom-template-card + # primary: InnoDB Buffer Pool + # secondary: "{{ states('sensor.mariadb_buffer_pool_size') }}" + # icon: mdi:memory + # layout: vertical + # icon_color: blue + # - type: custom:mushroom-template-card + # primary: Max Connections + # secondary: "{{ states('sensor.mariadb_max_connections') }}" + # icon: mdi:account-multiple + # layout: vertical + # icon_color: green + # - type: custom:mushroom-template-card + # primary: Log File Size + # secondary: "{{ states('sensor.mariadb_log_file_size') }}" + # icon: mdi:file + # layout: vertical + # icon_color: orange + # - type: custom:mushroom-template-card + # primary: Temp Table Size + # secondary: "{{ states('sensor.mariadb_tmp_table_size') }}" + # icon: mdi:table + # layout: vertical + # icon_color: purple + # - type: custom:mushroom-template-card + # primary: IO Capacity + # secondary: "{{ states('sensor.mariadb_io_capacity') }}" + # icon: mdi:speedometer + # layout: vertical + # icon_color: red + # - type: custom:mushroom-template-card + # primary: IO Threads + # secondary: "{{ states('sensor.mariadb_io_threads') }}" + # icon: mdi:developer-board + # layout: vertical + # icon_color: cyan + # - type: custom:mushroom-template-card + # primary: Table Cache + # secondary: "{{ states('sensor.mariadb_table_cache') }}" + # icon: mdi:cached + # layout: vertical + # icon_color: amber + # - type: custom:mushroom-template-card + # primary: Buffer Sizes + # secondary: "{{ states('sensor.mariadb_buffer_sizes') }}" + # icon: mdi:buffer + # layout: vertical + # icon_color: teal - type: glance show_icon: false columns: 3 diff --git a/lovelace/view-overview.yaml b/lovelace/view-overview.yaml index aa8ccea..e2c1fce 100644 --- a/lovelace/view-overview.yaml +++ b/lovelace/view-overview.yaml @@ -503,7 +503,7 @@ badges: state_not: "0" chip: type: template - entity: group.lights_left_on + entity: binary_sensor.lights_left_on icon: mdi:lightbulb-on tap_action: action: more-info diff --git a/scripts/master_bedroom/wake_up_the_master_bedroom.yaml b/scripts/master_bedroom/wake_up_the_master_bedroom.yaml index 2b25d0a..fc517b5 100644 --- a/scripts/master_bedroom/wake_up_the_master_bedroom.yaml +++ b/scripts/master_bedroom/wake_up_the_master_bedroom.yaml @@ -13,29 +13,29 @@ sequence: - action: media_player.volume_set target: - entity_id: media_player.home_assistant_voice_097b44_media_player + entity_id: media_player.ma_home_assistant_voice_097b44_media_player data: volume_level: "{{iif(volume>1,1,volume)}}" - - action: media_player.play_media - data: - media_content_id: media-source://media_source/alarms/Alarm_Clock.mp3 - media_content_type: music - target: - entity_id: media_player.home_assistant_voice_097b44_media_player + # - action: media_player.play_media + # data: + # media_content_id: media-source://media_source/alarms/Alarm_Clock.mp3 + # media_content_type: music + # target: + # entity_id: media_player.ma_home_assistant_voice_097b44_media_player - - delay: - hours: 0 - minutes: 0 - seconds: 12 - milliseconds: 0 + # - delay: + # hours: 0 + # minutes: 0 + # seconds: 12 + # milliseconds: 0 - action: tts.speak target: entity_id: tts.google_translate_en_com data: - media_player_entity_id: media_player.home_assistant_voice_097b44_media_player - message: "It is time to wake up, so get out of bed and get ready for work" + media_player_entity_id: media_player.ma_home_assistant_voice_097b44_media_player + message: "Its {{ now().strftime('%-I:%M %p') }} so you need to get out of bed and get ready for work and get the kids ready for school" # - action: tts.speak # target: