Files
homelab/active/device_home_assistant/home_assistant.md
ducoterra 5184c84d50
All checks were successful
Podman DDNS Image / build-and-push-ddns (push) Successful in 33s
overhauls of most service docs
2025-07-22 18:29:07 -04:00

12 KiB
Raw Blame History

Home Assistant

Setup and Configuration

Schlage Door Lock

  1. Install Z-wave
  2. Install z-wave JS module
  3. Add device -> How do you want to add your device -> Legacy Secure
  4. Disconnect and Reconnect the battery on the lock
  5. Press and hold the zwave button until the light turns solid red, release and it should flash red
    1. (OR) Enter programming pin on lock -> 0 (this may take a few attempts, don't click the pair button)

If the lock ever disconnects you can safely delete it from home assistant and re-interview. It will set back up with the correct entity IDs and automations/dashboards will work just fine.

Philips Hue Lights

  1. I configure all philips hue lights through zigbee directly connected to HA

hue lights support color_temp in mireds, here are some mired-kelvin conversions:

Kelvin Mired
6000 167
4000 250
2600 385

Shelly

  1. Outbound Websocket wss://homeassistant.reeseapps.com/api/shelly/ws

Shelly devices can act as "passive" or "active" bluetooth scanners. Both of these configurations allow home assistant to proxy bluetooth connections through shelly devices, significantly extending the range of your home assistant's bluetooth capabilities. Active scanning uses more power but is quicker to pick up and transmit device information. Note that "gateway mode" is not required, just enable bluetooth and rpc or select "active" from the configuration menu for the shelly device.

Barometer

https://www.thoughtco.com/how-to-read-a-barometer-3444043

A barometric reading over 30.20 inHg is generally considered high, and high pressure is associated with clear skies and calm weather.

If the reading is over 30.20 inHg (102268.9 Pa or 1022.689 mb):

  • Rising or steady pressure means continued fair weather.
  • Slowly falling pressure means fair weather.
  • Rapidly falling pressure means cloudy and warmer conditions.

A barometric reading in the range of 29.80 and 30.20 inHg can be considered normal, and normal pressure is associated with steady weather.

If the reading falls between 29.80 and 30.20 inHg (100914.4102268.9 Pa or 1022.6891009.144 mb):

  • Rising or steady pressure means present conditions will continue.
  • Slowly falling pressure means little change in the weather.
  • Rapidly falling pressure means that rain is likely, or snow if it is cold enough.

A barometric reading below 29.80 inHg is generally considered low, and low pressure is associated with warm air and rainstorms.

If the reading is under 29.80 inHg (100914.4 Pa or 1009.144 mb):

  • Rising or steady pressure indicates clearing and cooler weather.
  • Slowly falling pressure indicates rain.
  • Rapidly falling pressure indicates a storm is coming.

A basic automation would look like

It's {{ int(states("sensor.grouse_temp")) }} degrees and {{ states("weather.grouse_weather") }}. The relative humidity is {{ states("sensor.grouse_humidity") }}%. I'm seeing {{ int(states("sensor.grouse_wind_speed")) }}mph wind with gusts up to {{ int(states("sensor.grouse_wind_gust")) }}mph.

{% set pressure = float(states("sensor.grouse_rel_pressure")) %}
The barometer reads {{ pressure }}inHg.
{% if pressure > 30.20 %}
Fair weather is expected
{% elif pressure > 29.80 %}
Rain is possible
{% else %}
Rain is coming.
{% endif %}

Relative Humidity Calculator

https://www.wikihow.com/Calculate-Humidity

You can calculate the relative humidity of the outdoor air if warmed to indoor temperatures like so:

{% set dew_point = state_attr("weather.forecast_home", "dew_point") %}
{% set air_temp_f = state_attr("climate.ecobee_thermostat", "current_temperature") %}
{% set air_temp = (5/9)*(air_temp_f-32) %}
{% set sat_vap_press = 6.11 * 10**((7.5*air_temp) / (237.3+air_temp)) %}
{% set act_vap_press = 6.11 * 10**((7.5*dew_point) / (237.3+dew_point)) %}
{% set rel_hum = 100*(act_vap_press / sat_vap_press) %}

{{ dew_point }}
{{ air_temp }}
{{ sat_vap_press }}
{{ act_vap_press }}
{{ rel_hum }}

Font Colors

<font color = {{ "green" if state_attr("climate.ecobee_thermostat", "current_humidity") > low_humidity and state_attr("climate.ecobee_thermostat", "current_humidity") < high_humidity else "red" }}>
HVAC Humidity: {{ state_attr("climate.ecobee_thermostat", "current_humidity") }}%
</font>

Light Indicator for Voice Assistant

alias: Flash Lights on Bedroom Voice Assistant Start
description: ""
triggers:
  - type: turned_on
    device_id: d50fa1ae499e88bf37225c7e82ed189b
    entity_id: 7ab2896ca3a55efd2e0ee9bba91fdf68
    domain: binary_sensor
    metadata:
      secondary: false
    trigger: device
conditions: []
actions:
  - action: scene.create
    metadata: {}
    data:
      scene_id: bedroombeforescene
      snapshot_entities:
        - light.main_bedroom_lamps
  - action: light.turn_on
    metadata: {}
    data:
      transition: 0.25
      brightness_step_pct: 5
    target:
      entity_id: light.main_bedroom_lamps
  - delay:
      hours: 0
      minutes: 0
      seconds: 0
      milliseconds: 250
  - action: scene.turn_on
    data:
      entity_id: scene.bedroombeforescene
      transition: 0.25
mode: single

Blank Button (Spacer)

- type: button
tap_action:
    action: none
show_state: false
show_name: false
show_icon: false
hold_action:
    action: none

Roku Remote

type: vertical-stack
cards:
  - type: entity
    entity: select.left_living_room_application
  - square: true
    type: grid
    cards:
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: perform-action
          perform_action: remote.send_command
          target:
            entity_id: remote.left_living_room
          data:
            command: power
        entity: remote.left_living_room
        icon: mdi:power
        name: power
        show_state: false
        hold_action:
          action: none
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: perform-action
          perform_action: remote.send_command
          target:
            entity_id: remote.left_living_room
          data:
            command: volume_down
        entity: remote.left_living_room
        icon: mdi:volume-minus
        name: volume down / hold mute
        show_state: false
        hold_action:
          action: perform-action
          perform_action: remote.send_command
          target:
            entity_id: remote.left_living_room
          data:
            command: volume_mute
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: perform-action
          perform_action: remote.send_command
          target:
            entity_id: remote.left_living_room
          data:
            command: volume_up
        entity: remote.left_living_room
        icon: mdi:volume-plus
        name: volume up / hold mute
        show_state: false
        "hold_action:":
          action: perform-action
          perform_action: remote.send_command
          target:
            entity_id: remote.left_living_room
          data:
            command: volume_mute
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: perform-action
          perform_action: remote.send_command
          target:
            entity_id: remote.left_living_room
          data:
            command: back
        entity: remote.left_living_room
        icon: mdi:undo
        name: back
        show_state: false
        hold_action:
          action: none
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: perform-action
          perform_action: remote.send_command
          target:
            entity_id: remote.left_living_room
          data:
            command: up
        entity: remote.left_living_room
        icon: mdi:arrow-up-bold
        name: up
        hold_action:
          action: none
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: perform-action
          perform_action: remote.send_command
          target:
            entity_id: remote.left_living_room
          data:
            command: home
        entity: remote.left_living_room
        icon: mdi:home
        name: home
        hold_action:
          action: none
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: perform-action
          perform_action: remote.send_command
          target:
            entity_id: remote.left_living_room
          data:
            command: left
        entity: remote.left_living_room
        icon: mdi:arrow-left-bold
        name: left
        hold_action:
          action: none
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: perform-action
          perform_action: remote.send_command
          target:
            entity_id: remote.left_living_room
          data:
            command: select
        entity: remote.left_living_room
        icon: mdi:select-all
        name: select
        hold_action:
          action: none
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: perform-action
          perform_action: remote.send_command
          target:
            entity_id: remote.left_living_room
          data:
            command: right
        entity: remote.left_living_room
        icon: mdi:arrow-right-bold
        name: right
        hold_action:
          action: none
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: perform-action
          perform_action: remote.send_command
          target:
            entity_id: remote.left_living_room
          data:
            command: play
        entity: remote.left_living_room
        icon: mdi:play-pause
        name: play/pause
        hold_action:
          action: none
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: perform-action
          perform_action: remote.send_command
          target:
            entity_id: remote.left_living_room
          data:
            command: down
        entity: remote.left_living_room
        icon: mdi:arrow-down-bold
        name: down
        hold_action:
          action: none
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: perform-action
          perform_action: remote.send_command
          target:
            entity_id: remote.left_living_room
          data:
            command: info
        entity: remote.left_living_room
        icon: mdi:wrench
        name: settings
        hold_action:
          action: none
title: Left Living Room TV

Flair Vent Battery

Flair vents report low battery at 2.4v. 3v is nominal/full.

{% set volt_min=2.4 %}
{% set volt_max=3.0 %}
{% set volt_diff_max=0.6 %}

{{ (min(float(states("sensor.main_bedroom_29bf_voltage")) - volt_min, volt_diff_max) / volt_diff_max) * 100 }}

Voice

Custom Sentences

https://developers.home-assistant.io/docs/voice/intent-recognition/template-sentence-syntax/#sentence-templates-syntax

Notifications

Notification Information:

https://www.home-assistant.io/docs/automation/templating/

Triggered by {{ trigger.entity_id }}, Date: {{ now().strftime('%Y-%m-%d') }}, Time: {{ now().strftime('%H:%M') }}