weather station esphome and others

This commit is contained in:
root
2024-05-27 22:20:04 +12:00
parent 945177d535
commit 155725ba3a
32 changed files with 4341 additions and 182 deletions

View File

@@ -1,55 +0,0 @@
var:
covid_daily:
friendly_name: "Daily Covid count"
initial_value: 0
icon: mdi:virus-outline
covid_yesterday_total:
friendly_name: "Yesterdays NZ Cumulative Total Covid Cases"
initial_value: 0
icon: mdi:virus-outline
automation:
- id: add_covid_confirmed_stats_only_if_increases
alias: add_covid_confirmed_stats_only_if_increases
#description:
# "Check new state of sensor.new_zealand_coronavirus_confirmed and store it
# in input_number.new_zealand_coronavirus_confirmed_previous_value if it has increased"
trigger:
- platform: state
entity_id: sensor.new_zealand_coronavirus_confirmed
condition:
- condition: template
value_template:
"{{ (states('sensor.new_zealand_coronavirus_confirmed') | float
> states('var.covid_yesterday_total') | float) }}"
action:
- service: var.set
data_template:
entity_id: var.covid_daily
value:
"{{ states('sensor.new_zealand_coronavirus_confirmed') | float - states('var.covid_yesterday_total')
| float }}"
- service: var.set
data_template:
entity_id: var.covid_yesterday_total
value: "{{ states('sensor.new_zealand_coronavirus_confirmed') | float }}"
sensor:
- platform: statistics
entity_id: sensor.coronavirus_totals_normalised
sampling_size: 200000
state_characteristic: mean
max_age:
days: 1
name: "Coronavirus Statistics"
- platform: template
sensors:
coronavirus_totals_normalised:
friendly_name: "NZ Coronavirus Totals (Normalised)"
value_template: >
{% set new_state = states('sensor.new_zealand_coronavirus_confirmed') | float %}
{% if new_state >= states('input_number.new_zealand_coronavirus_confirmed_previous_value') | float %}
{{ new_state }}
{% else %}
{{ states('input_number.new_zealand_coronavirus_confirmed_previous_value') | float }}
{% endif %}

View File

@@ -1,27 +1,39 @@
mqtt:
sensor:
- unique_id: 32a_ev_charger_power
name: "32A EV Charger Power"
- unique_id: 32a_ev_wallcharger_power
name: "32A EV Wallcharger Power"
device_class: power
unit_of_measurement: kW
state_topic: "stat/tasmo-wemosd1-7280-powermon-1/EnergyMeterCount"
value_template: "{{ value_json.EVChargerWhCount * 2 * 60 }}"
- unique_id: 16a_ev_charger_power
name: "16A EV Charger Power"
value_template: "{{ value_json.EVChargerWhCount * 2 * 60 / 1000 }}"
- unique_id: 16a_ev_wallcharger_power
name: "16A EV Wallcharger Power"
device_class: power
unit_of_measurement: kW
state_topic: "stat/tasmo-s4chan-7594-garage-1/EnergyMeterCount"
value_template: "{{ value_json.EVChargerWhCount * 2 * 60 }}"
value_template: "{{ value_json.EVChargerWhCount * 2 * 60 / 1000 }}"
# Use the Riemann sum integral to calculate energy in kWh
# from the contimuous power measuring sensors
sensor:
- platform: integration
unique_id: 32a_ev_charger_power_total
name: "32A EV Charger Power Total"
source: sensor.32a_ev_charger_power
#unit_prefix: k
#round: 2
unique_id: 32a_ev_wallcharger_power_total
name: "32A EV Wallcharger Power Total"
source: sensor.32a_ev_wallcharger_power
#device_class: energy
#unit_of_measurement: Wh
#unit_time: h
#unit_prefix: k # Show in kWh
round: 0 # Only need 0 decimals accuracy
- platform: integration
unique_id: 16a_ev_charger_power_total
name: "16A EV Charger Power Total"
source: sensor.16a_ev_charger_power
unique_id: 16a_ev_wallcharger_power_total
name: "16A EV Wallcharger Power Total"
source: sensor.16a_ev_wallcharger_power
#device_class: energy
#unit_of_measurement: Wh
#unit_time: h
#unit_prefix: k
#round: 2
round: 0
input_select:
leaf_ev_charging_mode:

View File

@@ -0,0 +1,4 @@
input_boolean:
foxhole_occupied:
name: Foxhole Guest Occupied
icon: mdi:briefcase-plus-outline

View File

@@ -1,7 +0,0 @@
sensor:
- platform: google_keep
username: !secret google_keep.username
password: !secret google_keep.password
labels:
- "Home Assistant"
pinned: true

View File

@@ -0,0 +1,12 @@
mqtt_statestream:
base_topic: hamqtt
publish_attributes: true
publish_timestamps: true
include:
entities:
- sensor.main_bathroom_humidity_change_rate
entity_globs:
- sensor.*_zt*
#exclude:
# entity_globs:
# - sensor.*zoruno*

View File

@@ -7,32 +7,61 @@
# value_template: "{{ value_json.ZbReceived.Office_Media_Button.Power }}"
automation:
- id: "1629271273952"
- id: pause_office_tv_on_media_button
alias: Pause Office TV on Media Button
description: ""
trigger:
- platform: state
entity_id: sensor.media_button_office_zbt04_action
to: "single"
- platform: event
event_type: zha_event
event_data:
device_ieee: 00:15:8d:00:06:79:46:c8
command: click
args:
click_type: single
condition: []
action:
- service: media_player.media_pause
target:
device_id: abb6b5a6b4e4925dcb3a77ea2c293eaa
mode: single
- id: "1629271457675"
- id: play_office_tv_on_media_button
alias: Play Office TV on Media Button
description: ""
trigger:
- platform: state
entity_id: sensor.media_button_office_zbt04_action
to: "double"
- platform: event
event_type: zha_event
event_data:
device_ieee: 00:15:8d:00:06:79:46:c8
command: click
args:
click_type: double
condition: []
action:
- service: media_player.media_play
target:
device_id: abb6b5a6b4e4925dcb3a77ea2c293eaa
mode: single
- id: seek_office_tv_on_media_button
alias: Seek Office TV on Media Button
description: ""
trigger:
- platform: event
event_type: zha_event
event_data:
device_ieee: 00:15:8d:00:06:79:46:c8
command: click
args:
click_type: triple
condition: []
action:
- service: media_player.media_seek
data:
seek_position: >-
{{ state_attr("media_player.office_tv",
"media_position")|int + (seek_amount|default(-30)|int(-30)) }}
target:
device_id: abb6b5a6b4e4925dcb3a77ea2c293eaa
mode: single
# - id: "1629271273958"
# alias: Pause office TV on MQTT
# description: ""
@@ -60,3 +89,32 @@ automation:
# data:
# seek_position: 30
# mode: single
#automation:
# - id: "1629271273952"
# unique_id: pause_office_tv_on_media_button
# alias: Pause Office TV on Media Button
# description: ""
# trigger:
# - platform: state
# entity_id: sensor.media_button_office_zbt04_action
# to: "single"
# condition: []
# action:
# - service: media_player.media_pause
# target:
# device_id: abb6b5a6b4e4925dcb3a77ea2c293eaa
# mode: single
# - id: "1629271457675"
# alias: Play Office TV on Media Button
# description: ""
# trigger:
# - platform: state
# entity_id: sensor.media_button_office_zbt04_action
# to: "double"
# condition: []
# action:
# - service: media_player.media_play
# target:
# device_id: abb6b5a6b4e4925dcb3a77ea2c293eaa
# mode: single

View File

@@ -1,3 +1,11 @@
sensor:
- platform: integration
unique_id: pool_pump_power_total
name: "Pool pump power total"
source: sensor.tasmo_athplug_5853_3_poolpump_energy_power
unit_prefix: k
#round: 2
input_select:
pool_light_colour_select:
icon: mdi:swimming-pool

View File

@@ -75,3 +75,24 @@ sensor:
state_topic: !secret btb09_topic
timeout: 60
away_timeout: 120 # number of seconds after which the enitity will get status not_home
- platform: mqtt_room
unique_id: !secret btb10_uID
device_id: !secret btb10_dID
name: !secret btb10_name
state_topic: !secret btb10_topic
timeout: 60
away_timeout: 120 # number of seconds after which the enitity will get status not_home
- platform: mqtt_room
unique_id: !secret btb11_uID
device_id: !secret btb11_dID
name: !secret btb11_name
state_topic: !secret btb11_topic
timeout: 60
away_timeout: 120 # number of seconds after which the enitity will get status not_home
- platform: mqtt_room
unique_id: !secret btb12_uID
device_id: !secret btb12_dID
name: !secret btb12_name
state_topic: !secret btb12_topic
timeout: 60
away_timeout: 120 # number of seconds after which the enitity will get status not_home

View File

@@ -0,0 +1,7 @@
input_boolean:
quiet_time:
name: Quiet time for no notifications
icon: mdi:shield-moon
away_occupied_routine:
name: Automation for Lights etc when away
icon: mdi:shield-lock

View File

@@ -0,0 +1,7 @@
sensor:
- platform: derivative
name: Main Bathroom Humidity Change Rate
source: sensor.main_bathroom_environment_zth04_humidity
round: 1
unit_time: s # the resulting "unit_of_measurement" will be %H/s if the sensor.temperate has set %H as its unit
time_window: "00:00:10" # we look at the change over the last 10 seconds

5
packages/tautulli.yaml Normal file
View File

@@ -0,0 +1,5 @@
sensor:
- platform: tautulli
api_key: !secret tautulli_api_key
host: !secret tautulli_api_host
port: !secret tautulli_api_port

View File

@@ -3,3 +3,53 @@ waste_collection_schedule:
- name: aucklandcouncil_govt_nz
args:
area_number: 12344403722 # see 'How to get the source argument below'
sensor:
- platform: waste_collection_schedule
#source_index: 0
name: Auckland Council Waste
details_format: upcoming
count: 1
leadtime: 1
#value_template: VALUE_TEMPLATE
#date_template: DATE_TEMPLATE
add_days_to: true
#event_index: EVENT_INDEX
types:
- rubbish
- platform: waste_collection_schedule
#source_index: 0
name: Auckland Council Recycling
details_format: upcoming
count: 1
leadtime: 1
#value_template: VALUE_TEMPLATE
#date_template: DATE_TEMPLATE
add_days_to: true
#event_index: EVENT_INDEX
types:
- recycle
- platform: waste_collection_schedule
#source_index: 0
name: Auckland Council Food-Waste
details_format: upcoming
count: 1
leadtime: 1
#value_template: VALUE_TEMPLATE
#date_template: DATE_TEMPLATE
add_days_to: true
#event_index: EVENT_INDEX
types:
- food-waste
mqtt:
sensor:
- unique_id: auckland_council_red_waste_bin_out
name: "Red Waste Bin Out"
state_topic: "viewroad-status/rubbishbinstatus/redbin-out"
- unique_id: auckland_council_green_recycling_bin_out
name: "Green Recycling Bin Out"
state_topic: "viewroad-status/rubbishbinstatus/greenbin-out"
- unique_id: auckland_council_food_waste_bin_out
name: "Food Waste Bin Out"
state_topic: "viewroad-status/rubbishbinstatus/foodbin-out"