Quantcast
Channel: Configuration - Home Assistant Community
Viewing all 109599 articles
Browse latest View live

Individually controllable LEDs with WLED

$
0
0

Hello. I have a handful of WLED strips in my house, all work great. I have one other WS2812 behind my basement TV. I’m doing this through ESPHome/Neopixel so that I can manually control each LED. For this use case, I’m using the lights to display a light bar that goes around the screen a distance equal to the probability of my favorite sports teams will win. For example, when the team has a 40% chance of winning, the light goes 40% around the TV. This also works great.

What I would like to do, however, is use the same LED strip to be able to use the best of both worlds. Having all the effects and functionality of WLED with the ability to still control each LED individually. I’m not sure if there is a way to do this.

My first thought is to just have two ESP boards with one running WLED and the other with ESPHome with the data lines from both feeding the LED strip. I worry, however, if that would be problematic? Would it cause harm to the boards?

If that isn’t an option, does anyone have any other ideas? Is there maybe a way to control each bulb in WLED that I’m not aware of?

Thanks.

1 post - 1 participant

Read full topic


Anthropic - Unexpected Error

$
0
0

Hi All,

I am trying to add the Anthropic Conversation agent but when i paste my api key i get an unknown error, if the key is incorrect i get invalid authentication.

I have checked the logs (core, supervisor, host) i am unable to find any entries to help me debug the fault

Any help would be great

Thanks

1 post - 1 participant

Read full topic

Stora calibration data for Arduino sensors in Homeassistant?

$
0
0

Hey, I’m just getting started with Homeassistant and I will have some Arduinos with sensors that will send data to HA. But the sensors need two calibration values and I want to be able to send those from the Arduinos to HA to store them there incase I want to reflash the Arduinos.

What would be a good way to set it up? I have managed to send the calibration values with MQTT to HA and store it as helpers. But its quite time consuming as I (think) need to create the helpers manually.

1 post - 1 participant

Read full topic

Newly migrated to Home Assistant with Matter/Thread issues

$
0
0

I recently moved from SmartThings to Home Assistant (wish I had done this a long time ago). Everything has been great except my Thread/Matter integration. I had the same devices running on SmartThings with no issues. But in Home Assistant I have nothing but issues.

First of all, I had to migrate my network to Home Assistant’s Open Thread Border Router, which was an adventure all its own that included me having to clear app data on my phone. I eventually got it working, but I had issues immediately with very slow response times. I have a switch setup to control 2 Zigbee lights and 4 Matter lights. When I hit the switch, the Zigbee lights responded instantly. The Matter lights however take their sweet time. Sometimes like 30 seconds to a minute to either turn on or off. Some will turn on faster and others come later. When these same lights were connected to SmartTthings I never had an issue. There was a tiny extra delay compared to Zigbee, but not enough that I ever thought about it.

Now, after they have been hooked up for a couple weeks and I’ve just been dealing with the slowness, they have started disconnecting entirely. All 4 Matter lights went to unavailable. I tried reloading all the related integrations and add ons. I restarted Home Assistant. I power cycled the lights. Nothing got the lights to connect back to the network. Eventually 2 of the lights got reconnected but the other two are still unavailable. Even the 2 that reconnected go in and out of availability.

I have a Home Assistant Green with Open Thread Border Router installed with the standard Thread and Matter integrations. All my software is fully up to date. I have a ZBT-1 running the radio with the latest firmware. My stick is connected to a powered USB 2.0 hub that is as far away from my Wi-Fi as I can get it. The stick is in the same location as my Zigbee and zwave radios and I am not having issues with either of those. The Home Assistant is in the same location that my SmartThings hub was.

One more thing to mention is, while I was transitioning to Home Assistant, I had these lights still connected to the SmartThings border router and hooked into Home Assistant through Matter. I did not have these issues until I hooked them up to the Open Thread Border Router on Home Assistant.

Does the Open Thread Border Router just not work well in Home Assistant? I’d prefer to not have to swap out my Nano Leaf lights as I like them a lot. But I’m not sure I can deal with just not being able to use these lights at all.

Does anyone have any suggestions on how I can fix this?

1 post - 1 participant

Read full topic

Sonoff RF Bridge (Tasmota and Portisch)

$
0
0

Hello all, I was hoping that somebody could see if I’m doing something wrong.

I have a flashed Sonoff RF Bridge with Tasmota and Portisch so I can send rf signals to a rf diesel heater controller.

The bridge seems to see a signal when I send a mqtt script from HA but nothing actually happens on the receiving controller.

I took some screen shots of what I have done so far if you need anything else please let me know. I did have this working a few years ago and couldn’t find any old posts that worked.

Thanks in advance!

Corey




script.yaml

workshop_heat_off:
alias: Turn Off Heat
sequence:
- service: mqtt.publish
data:
topic: “cmnd/tasmota/backlog”
payload: “RfRaw AA B0 21 03 08 04CE 01A4 3124 28190908190908181818190818190908181909090908190909 55”

1 post - 1 participant

Read full topic

Big house with dynamic profiles for each user

$
0
0

Hi guys,

I just switched to HA and I’m having a great time configuring my house.
but I have a question, I want suggestions on how to design the dashboards.

I live in a big house with 3 floors. And I’m planning to make a dashboard specific to each user ( 5 mobile users and 5 wall mounted tablets ), The mobile users each of them have their own room so I want to make their rooms the main dashboard for each profile + I want to make a navigation bar with a fav icon that directs them to their rooms dashboard. Do I need to make a navigation bar for each profile? And btw I’m thinking of making different dashboards for wall mounted tablets should I do it myself or there is a " dynamic " cards for each viewports.

All suggestions are welcomed. I’m new to HA so all info would be appreciated.

1 post - 1 participant

Read full topic

Dozens of notifications for the same 2 devices

$
0
0

I connected Nabu Casa to Alexa last night two light Kasa light switches and a script. They all work as expected.

I keep getting notifications for the two light swtiches on the Alexa android app saying: "New switch named Office Light found. To control it, say “Alexa, furn on Office Light.”

I get them about every 20 mins or so.

I have tried disconnecting the HA skill from alexa, and re connecting.

Any ideas?

1 post - 1 participant

Read full topic

Badge popup

$
0
0

I have a badge that shows me a count of all lights that are On. And I have a card that shows me a list of the lights that are On. I would like to when I tap the badge, I have a popup with the card that lists all the lights that are On. Is that possible?
Thank you.

2 posts - 2 participants

Read full topic


Broadlink Pro

$
0
0

Im really striuggling getting a broadlink pro to work. Ive a few devices that use IR and RF that I wanted to control, so I invested in a BL Pro

Ive followed the documentation, as far as learning commands. All seem to work fine… see example screenshot

I get the green tick, suggesting that the command has indeed been learnt.

However, what I cant get working is sending commands I have learnt. When I try to create a script and send a command…

I get this error; Error Running Action

Ive read various support topics, and one mentions that there should be a file called BROADLINK.devive id in my config folder. But I dont have any such file, so I wonder if this could be the cause…that it isnt saving the learnt commands anywhere.

Does anyone know what Imight do to get this working please?

2 posts - 2 participants

Read full topic

Issue with Hue Motion Sensor and Deconz Zigbee Stick in ZHA – Long “No Motion” Detection Time

$
0
0

Hi everyone,

I’m using a Philips Hue Motion Sensor with a Deconz Zigbee Stick and ZHA in Home Assistant. Motion detection works very quickly, but there’s a problem when it comes to detecting “no motion.” Even after I leave the room, it can take up to 5 minutes before the sensor reports no movement.

Is this a known issue? Is there any way to reduce the delay? I would appreciate any insights or possible workarounds!

Thanks in advance!

2 posts - 2 participants

Read full topic

New LinknLink Pro

[Google Cast] How to Trigger Automation based on Volume of Android TV?

$
0
0

I cant find how to trigger an Automation based on when the volume level changes on Android TV / Google cast device?

I know its possible, my Homeseer system does it.

thx

1 post - 1 participant

Read full topic

Dawkins Dash Board

$
0
0

I have iPad 12.9 pro. Have cleared the coach and still get an error of missing custom component.

2 posts - 2 participants

Read full topic

Script doesn’t trigger from automation

$
0
0

Hi all,

I’m trying to trigger a script, once an automation has sent a message to my iphone. The title with the context menu opens, but the script ist not triggered. Any idea of what I’m doing wrong?

alias: Garage door open
description: ""
triggers:
  - entity_id:
      - binary_sensor.garage
    from: "off"
    to: "on"
    for:
      hours: 0
      minutes: 31
      seconds: 0
    trigger: state
conditions: []
actions:
  - metadata: {}
    data:
      title: Garage door open
      message: Garage door open
      data:
        actions:
          - service: script.turn_on
            target:
              entity_id: script.test
            title: test
    action: notify.mobile_app_iphone_xxx
mode: single

1 post - 1 participant

Read full topic

Advanced database configuration (per device/entity)

$
0
0

I can see that in the config file I can setup exclude and include settings, I am assuming that these basically say “don’t save x data in the recorder at all”, but is there a way of setting different polling rates/retention times/long term data retention / or whatever per … something? (or am I misunderstanding how that works?)

So, for example, something like the battery level of a sensor is probably only worth keeping for a shorter time, and maybe only worth polling say once per day or so (depending on the device), and something like an outside temp sensor might only need to be polled once per hour, but an inside sensor I might want to get a more minute by minute record to see how my hvac system is working. and I might want to keep some data as long as possible, but other data I may decide I don’t really need to keep them for more than a few days / weeks / months.

I realize that the effort to configure something like this would be high and probably not worth it for most (and honestly, I might not even do it myself), so I’m mostly interested in understanding if it’s reasonably possible (without custom coding).

3 posts - 2 participants

Read full topic


So Close and yet

$
0
0

Hi,

I have set up duckdns on my HA, port forwarded 443, drunk several cups of strong coffee and I just get the Home Assistant loading page but not the goodies that lie beyond.

I am so close so there must be something simple that I have missed or not done properly.

Can anyone help me please?

3 posts - 2 participants

Read full topic

Help Commissioning a Thread device

$
0
0

I’m trying to commission an Inovelli white switch to my HA Yellow using an iPhone. After scanning the device, it connects, goes through setup, and then says “Thread Border Router Required. I already have the Thread, Matter, and open thread border router integrations installed. I have a thread network setup and I sent the credentials to my iPhone. I followed the instructions for setting up thread. I don’t have a “ Remove 802.15.4 radio multiprotocol support” option when I go to the hardware, I only have “switch between Zigbee or Thread firmware”. The Zigbee integration was removed already.

2 posts - 1 participant

Read full topic

MQTT entities showing correct data but erroring "This entity is unavailable"

$
0
0

I have a Pico W running a python script publishing sensor readings from a BME280 to MQTT. I am running both homeassistant and moquitto in docker containers on my raspberry pi.

I have confirmed that the MQTT connection is working and that data is being received, as when I go to settings > devices and services > MQTT > entities, the topics are displayed as follows:

This “entity is unavailable” error message is always showing. This is also causing (I think) neither of these ‘states’ to show up in the developer tools > states list, and when I add these entities to a dashboard, they only show the same error message (I cannot post another image as I am a new user).

I am at a complete loss as I have been troubleshooting this for countless hours to no avail…

My python file is as follows:

from machine import Pin, I2C
from time import sleep
import network
from umqtt.simple import MQTTClient
import config
import BME280
import json  # Import json to format the configuration messages

# Constants for MQTT Topics
MQTT_TOPIC_TEMPERATURE_CONFIG = 'homeassistant/sensor/pico_temperature/config'
MQTT_TOPIC_PRESSURE_CONFIG = 'homeassistant/sensor/pico_pressure/config'

# State topics for sensor readings
MQTT_TOPIC_TEMPERATURE_STATE = 'homeassistant/sensor/pico_temperature/state'
MQTT_TOPIC_PRESSURE_STATE = 'homeassistant/sensor/pico_pressure/state'

# MQTT Parameters
MQTT_SERVER = config.mqtt_server
MQTT_PORT = 1883  # Set to your MQTT port, usually 1883
MQTT_USER = config.mqtt_username
MQTT_PASSWORD = config.mqtt_password
MQTT_CLIENT_ID = b"raspberrypi_picow"
MQTT_KEEPALIVE = 100
MQTT_SSL = False   # set to False if using local Mosquitto MQTT broker

# Initialize I2C communication
i2c = I2C(id=1, scl=Pin(19), sda=Pin(18), freq=10000)

# Initialize BME280 sensor
bme = BME280.BME280(i2c=i2c, addr=0x76)

def get_sensor_readings():
    temp = float(bme.temperature[:-1])  # Get temperature and convert to float
    pres = float(bme.pressure[:-3])     # Get pressure and convert to float
    return temp, pres

def initialize_wifi(ssid, password):
    wlan = network.WLAN(network.STA_IF)
    wlan.active(True)

    # Connect to the network
    wlan.connect(ssid, password)

    # Wait for Wi-Fi connection
    connection_timeout = 10
    while connection_timeout > 0:
        if wlan.status() >= 3:
            break
        connection_timeout -= 1
        print('Waiting for Wi-Fi connection...')
        sleep(1)

    # Check if connection is successful
    if wlan.status() != 3:
        return False
    else:
        print('Connection successful!')
        network_info = wlan.ifconfig()
        print('IP address:', network_info[0])
        return True

def connect_mqtt():
    try:
        client = MQTTClient(client_id=MQTT_CLIENT_ID,
                            server=MQTT_SERVER,
                            port=MQTT_PORT,
                            user=MQTT_USER,
                            password=MQTT_PASSWORD,
                            keepalive=MQTT_KEEPALIVE,
                            ssl=MQTT_SSL)
                            
        client.connect()
        return client
    except Exception as e:
        print('Error connecting to MQTT:', e)
        raise  # Re-raise the exception to see the full traceback

def publish_sensor_config(client):
    # Device information
    device_info = {
        "identifiers": ["pico_w_sensor"],
        "name": "Raspberry Pi Pico W",
        "manufacturer": "Raspberry Pi",
        "model": "Pico W"
    }

    # Configuration for temperature sensor
    temperature_config = {
        "name": "Pico Temperature",
        "state_topic": MQTT_TOPIC_TEMPERATURE_STATE,
        "unit_of_measurement": "°C",
        "device_class": "temperature",
        "unique_id": "pico_temperature_1",
        "device": device_info
    }
    client.publish(MQTT_TOPIC_TEMPERATURE_CONFIG, json.dumps(temperature_config).encode('utf-8'), retain=True)

    # Configuration for pressure sensor
    pressure_config = {
        "name": "Pico Pressure",
        "state_topic": MQTT_TOPIC_PRESSURE_STATE,
        "unit_of_measurement": "hPa",
        "device_class": "pressure",
        "unique_id": "pico_pressure_1",
        "device": device_info
    }
    client.publish(MQTT_TOPIC_PRESSURE_CONFIG, json.dumps(pressure_config).encode('utf-8'), retain=True)

def publish_sensor_readings(client, temperature, pressure):
    client.publish(MQTT_TOPIC_TEMPERATURE_STATE, str(temperature), retain=True)
    client.publish(MQTT_TOPIC_PRESSURE_STATE, str(pressure), retain=True)



try:
    if not initialize_wifi(config.wifi_ssid, config.wifi_password):
        print('Error connecting to the network... exiting program')
    else:
        client = connect_mqtt()
        if client:
            # Publish sensor configurations
            publish_sensor_config(client)
            while True:
                # Read sensor data
                temperature, pressure = get_sensor_readings()

                # Publish sensor readings
                publish_sensor_readings(client, temperature, pressure)

                # Delay 10 seconds
                sleep(10)
        else:
            print("Failed to connect to MQTT broker.")

except Exception as e:
    print('Error:', e)

My docker-compose.yaml file contains:

version: '3.0'

services:
  portainer:
    container_name: portainer
    image: portainer/portainer-ce
    restart: always
    ports:
      - "9000:9000/tcp"
    environment:
      - TZ=Europe/London
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /opt/portainer:/data
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - /opt/homeassistant/config:/config
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    network_mode: host
  mosquitto:
    image: eclipse-mosquitto
    container_name: mosquitto
    volumes:
      - /opt/mosquitto:/mosquitto
      - /opt/mosquitto/data:/mosquitto/data
      - /opt/mosquitto/log:/mosquitto/log
    ports:
      - 1883:1883
      - 9001:9001

My home assistant is using the discovery prefix homeassistant and configuration.yaml contains:


# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

mqtt:
  sensor:
    - name: "Pico Temperature"
      state_topic: "homeassistant/sensor/pico_temperature/state"
      value_template: "{{ value | float }}"
      unit_of_measurement: "°C"
      device_class: "temperature"
      state_class: "measurement"  # This indicates the sensor is a numeric value

    - name: "Pico Pressure"
      state_topic: "homeassistant/sensor/pico_pressure/state"
      value_template: "{{ value | float }}"
      unit_of_measurement: "hPa"
      device_class: "pressure"
      state_class: "measurement"  # Same as above


Any help would be greatly appreciated, please let me know if anymore information is required!

1 post - 1 participant

Read full topic

Triggering an automation off a helper sensor?

$
0
0

Hi.

I have a device with attributes. I have a helper sensor that extracts one of those attributes.

sensor:
  - platform: template
    sensors:
      spotprice:
        value_template: "{{ state_attr('sensor.opennem_qld', 'price') }}"
        friendly_name: "QLD Price"
        unit_of_measurement: "$/MWh"

I have an automation that I am trying to trigger off that helper sensor, but it doesn’t work. I’m not sure how to debug?

alias: Stop charging at $50
description: ""
triggers:
  - entity_id:
      - sensor.spotprice
    above: 50
    trigger: numeric_state
    for:
      hours: 0
      minutes: 0
      seconds: 1
conditions: []
actions:
  - type: turn_off
    device_id: 51c582b0c75bfa04e7d8af6bb14d0109
    entity_id: switch.shellypro2_ec62608fa31c_switch_1
    domain: switch
mode: single

2 posts - 2 participants

Read full topic

Stuck on an automation, detecting a state works one direction, but not the other

$
0
0

Hi all HA automation wizards!

I have 30 solar panels, and want to detect when they go offline, or come back online and send me an email. I had ChatGPT assist creating an automation that seems to work in testing (manually changing the state of the entity changing from ‘working’ to anything else) The automation is great because I don’t need to list all of my panels, it dynamically build a list and detects from that, will come in handy should I ever get new panels, more panels, swap panels.

Now we tried to create one that detects returning back to ‘working’ it doesn’t seem to work, no matter what we’ve tried, I mostly ended up going in circles with ChatGPT for an hour, Google Gemini just flat out gave up after 3 or so attempts.

So here is the code that works for testing if the entity state changes from ‘working’ to anything else:
Scroll down a bit for what should work, well ChatGPT seems to think so.
And yes there’s some code in there that ChatGPT has been trying to fix some funky formatting in the email.

alias: Solar Panel Offline Alert
description: >-
  Notify when one or more solar panels are NOT in "working" state for more than
  5 seconds.
triggers:
  - value_template: |-
      {{ states.binary_sensor
          | selectattr('entity_id', 'search', '^binary_sensor\.inverter_') 
          | selectattr('state', 'ne', 'working') 
          | list | count > 0 }}
    for: "00:00:05"
    trigger: template
actions:
  - variables:
      offline_panels: |-
        {% set panels = states.binary_sensor
          | selectattr('entity_id', 'search', '^binary_sensor\.inverter_')
          | selectattr('state', 'ne', 'working')
          | list %}
        {% set panel_names = panels
          | map(attribute='attributes.friendly_name')
          | map('regex_replace', find=' ', replace='') %}
        {% for panel in panel_names %}
          - {{ panel }} ({{ panels[loop.index0].state }})
        {% endfor %}
  - data:
      target: yourmom@myhouse.com
      title: ⚠️ Solar Panel Alert
      message: >-
        The following solar panel(s) are NOT in "working" state for over 5
        seconds:

        {{ offline_panels | join('\n') }}
    action: notify.me-at_gmail_com
mode: parallel
max: 5

Okay, now for the code that doesn’t work testing when that sensor changes back to ‘working’

alias: Solar Panel Online Alert
description: Notify when one or more solar panels come back online.
triggers:
  - value_template: |-
      {{ states.binary_sensor
          | selectattr('entity_id', 'search', '^binary_sensor\.inverter_')
          | selectattr('state', 'eq', 'working')
          | list | count > 0 }}
    for: "00:00:05"
    trigger: template
actions:
  - variables:
      online_panels: |-
        {% set panels = states.binary_sensor
          | selectattr('entity_id', 'search', '^binary_sensor\.inverter_')
          | selectattr('state', 'eq', 'working')
          | list %}
        {% set panel_names = panels
          | map(attribute='attributes.friendly_name')
          | map('regex_replace', find='[^a-zA-Z0-9]', replace='_') %}
        {% for panel in panel_names %}
          - {{ panel }} ({{ panels[loop.index0].state }})
        {% endfor %}
  - data:
      level: debug
      message: ✅ Online Trigger Fired!
    action: system_log.write
  - data:
      target: yourmom@myhouse.com
      title: ✅ Solar Panel Online Alert
      message: >-
        The following solar panel(s) are back online: {{ online_panels |
        join('\n') }}
    action: notify.lol_gmail_com
mode: parallel
max: 5

I can manually run the “online” automation, and it does fire off an email, with all 30 panels listed. The formatting is funky, but first I want to fix functionality then the formatting of the email.

Thanks in advance for any assistance.

1 post - 1 participant

Read full topic

Viewing all 109599 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>