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

Open door/windows check and report via tts

$
0
0

God, I’m lost
I’ve been trying to get an automation check my binary sensors for my doors and windows at 10pm if they’re open or close and announce via notify.alexa_media which ones are open (or give it a ‘all clear’ if they’re closed).
I’ve obviously missing something, but I can’t get an ‘open’ notification.

Here’s the code:

alias: Check Doors and Windows at 10 PM
trigger:
  - platform: time
    at: "22:00:00"
condition: []
action:
  - variables:
      open_entities: >
        {%- set entities = [
          'binary_sensor.back_door',
          'binary_sensor.front_door',
          'binary_sensor.kitchen_door',
          'binary_sensor.living_room_patio_door',
          'binary_sensor.kitchen_window',
          'binary_sensor.study_window',
          'binary_sensor.utility_room_window',
          'binary_sensor.wc_window'
        ] -%}
        {%- set open_entities = entities | selectattr('state', 'eq', 'on') | list -%}
        {{ open_entities }}
  - choose:
      - conditions: "{{ open_entities | length > 0 }}"
        sequence:
          - service: notify.alexa_media
            data:
              target:
                - media_player.alexa_kitchen_2
                - media_player.bedroom
              message: >
                The following entities are open: 
                {{ open_entities | join(', ', attribute='entity_id') }}
      - conditions: "{{ open_entities | length == 0 or not open_entities }}"
        sequence:
          - service: notify.alexa_media
            data:
              target:
                - media_player.alexa_kitchen_2
                - media_player.bedroom
              message: "All windows and doors are closed"

Please help, why are the open sensors not changing the open_entities with the ones that are “on” status? It always return a value of 0

1 post - 1 participant

Read full topic


How to Control Google Home Devices through Home Assistant Interface?

$
0
0

I have several devices set up and controlled through Google Home. I want to control these same devices through the Home Assistant interface. What are the possible ways to achieve this without any payment? I’m using Home Assistant version 2024.7.2 installed on a Raspberry Pi. Any suggestions and guidance would be greatly appreciated.

Thank you

2 posts - 2 participants

Read full topic

Pirate Weather on Mars?

$
0
0

It looks like Pirate Weather forecasts are experiencing a major glitch. Anyone else seeing the same?

Here in Florida we are prepared for 119 MPH winds, but not those kind of gust speeds! :rofl:

1 post - 1 participant

Read full topic

Modbus help - write a register with calculated value

$
0
0

Hello
I am controlling a CCN (carrier) HVAC using Homeassistant. To stop short cycling of compressors, I write setpoints using the following automation. (Think of setpoint as thermostat temperature).

If Entering water temp (think room temp) is above 19, write 11 to holding register. (This switches on compressor and it slowly brings temp to 11).

The moment temp hits 11, write 19 to holding register (this stops the compressor as set temp is reached).

Worked very well. But i learnt the complexities of a chiller later on and ended up learning zm and szm (Its a multiple compressor unit). Long story - My approach of setting simple two setpoints is wrong. I need to “guide” the unit from 19 to 11 in steps - or it will switch on ALL the compressors (its a multi compressor unit). The unit can calculate this guide itself called sensor.setpoint- I just need to write this to register on frequent intervals when the unit is running.

So I need to do the following -
When the unit has started running (sensor.runstate=Running), do the following -
Write register 2 as a value which needs to be calculated as - sensor.setpoint+6
Do write this value every few seconds(say 10) till the sensor.runstate=Running.

My question -
How do I write to a register a calculated value (sensor.setpoint + 6)

How do I make sure this automation is in working state after reboot.
Do I make a combination of scene/automation/script?

Here is my current automation
trigger:

  • platform: state
    entity_id:
    • sensor.runstate
      from: null
      to: Running
      for:
      hours: 0
      minutes: 0
      seconds: 5
      condition:
      action:
  • service: modbus.write_register
    data:
    address: 2
    value: 12
    mode: single

4 posts - 2 participants

Read full topic

Problems after updating Core 2024.07

Integrate rain gauge

$
0
0

I know there are many topics on this, but in my opinion no topic fits my task.

I have build a weather station with a rain gauge:
The gauge transmits the following data using a webhook:

Sample Time (Timespan between the samples)
Rain value for an hour. (Means: wenn the weather station gets power first time, it resets this value every hour)
Rain value / hour (Means: (Rain value / sample time)*timeForAnHour)

I can now display two values in my home assistant UI:

Rain as liter/h
Rain last hour

What i want to have and configure is a simple 24 h (or 48h) graph which displays the rain value for every hour. Where should i start? Is this possible to archive in the UI. E.g. using a template helper and display the helper in some kind of UI element?
I also found the “Utility Meter” but i am not sure if i configured it correct. What UI element should i choos to display the utility meter data?

Oh, and i also found this history stats sensor.

Is it possible to create this sensor in the home assistant UI, or do i need to do this completely in yaml code?

I hope someone can help me. :slight_smile:

1 post - 1 participant

Read full topic

Unable to Delete Google Nest integration

$
0
0

Hey Guys and girls,

My Google Nest integration has stop working and after some troubleshooting, I decided to reconfigure it from scratch. The problem is I cannot delete the integration to remove to old devices / entitiies. I have the delete options but when I click it it is simply not deleted.

I’ve also tried to delete my application credentials first, but I am unable to remove them since they are still in use by the integration which I am unable to remove…

Any help in removing the integration so I can reinitiate the setup are apriciated.

1 post - 1 participant

Read full topic

Clean up statisticts automatically

$
0
0

Hi!

I have an Integration of the nenw Anker Solix Solarbank 2. This inntegration has three entities which I need in my energy dashboard for generated solar power, power to and from the battery. These sensors are daily based, so they should be reset in midnight.

Unfortunately these sensors are nit resettet at midnight, instead they are resettet somewhere between 0 and 0:15 which leads to inconsistent values in the energy dashboard. To fix this, I need to clean up these values manually in the statistics, wtach out for outliers and set them to zero.

is there any chance to automate that? Didn’t found anything about that.

1 post - 1 participant

Read full topic


Instant consumption with actual active devices

$
0
0

Hi, it’s possible to have under the power consumption indicator, a list of only ON devices such as lamp, AC, kitchen and so on…

Thank you

1 post - 1 participant

Read full topic

YA channel utilization thread?

$
0
0

In general, my zigbee network works alright. But recently I’ve noticed some devices having trouble. I reconnected some of them and they’ve stayed connected, but a few others disconnected again.

I have these messages in logs:

Zigbee channel 11 utilization is 89.94%!
If you are having problems joining new devices, are missing sensor updates, or have issues keeping devices joined, ensure your coordinator is away from interference sources such as USB 3.0 devices, SSDs, WiFi routers, etc.
Zigbee channel 11 utilization is 87.33%!

I have the SkyConnect.
I have a few Ikea repeaters throughout the house (and also a few Sonoff S31zbs).
I have neighbors, but they are not close by (nearest is probably 250-300ft or so from any of my devices).
I have my WiFi APs (for 2.4ghz) on channels 6 and 11 only so I have no nearby direct interference from the wifi.

I downloaded the diagnostics file and found:

    "energy_scan": {
      "11": 43.057636198227904,
      "12": 70.89933442360993,
      "13": 55.9836862725909,
      "14": 46.26944564832987,
      "15": 99.84693026606404,
      "16": 43.057636198227904,
      "17": 59.15797905332195,
      "18": 59.15797905332195,
      "19": 65.26028270288712,
      "20": 28.30261646762903,
      "21": 73.50699819621309,
      "22": 85.82097888710312,
      "23": 92.95959997754716,
      "24": 70.89933442360993,
      "25": 62.257682586134884,
      "26": 99.77408388719513
}

Interference on channel 11 must spike or something if the logs are showing those 87%+ numbers?

Channel 20 looks promising here, but this is just one data point and logically, with 2.4Ghz wifi on channels 6 and 11, there is a lot of chance for adjacent channel interference there, so I think it would be risky to move to that.

1 post - 1 participant

Read full topic

How to change icons based on state

$
0
0

Hi guys. I know this question comes up a lot, but I think I am stupid. I cannot find a solution to my simple problem. At least no solution I really understand…

So basically I just want to change the icon of an entity displayed at my dashboard based on an entity’s state. In this case I want to display an icon for my iPhone entity. The idea is:

  • Display mdi:battery-charging when the battery_state is Charging
  • Display the current battery level based on battery_level

For example, if the iPhone is connected to the charger and it has a battery level of 50 %, then display battery-charging-50. If it is not charging and it has around 70 %, then display battery-70.

Also it would be cool to know how I can also change the color of the icons based on the states.

The yaml of my frontend looks like this:

type: entities
entities:
  - entity: sensor.saschas_iphone_battery_level
    # This icon should change based on battery_state & battery_level    
    icon: mdi:battery
  - sensor.saschas_iphone_battery_state

So what do I need to do? I can find so many topics about this but each one is using different templates, yaml code or even plugins. How is it possible with just “vanilla” Home Assistant?

I appreciate every hint. Thanks!!

4 posts - 3 participants

Read full topic

Sensors created in configuration.yaml no longer work after Core 2024.7

$
0
0

Sensors created in configuration.yaml are still broken in 2024.7.2.

It broke in 2024.7.0

Here is what I have in configuration.yaml

command_line:
  - sensor:
      unique_id: xcel_meter_power
      name: "Smart Electric Meter Power"
      #command: "OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/1/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem 2>&1 | grep -o '<value>.*</value>' | grep -Eo '[0-9]+'"
      command: "export OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/1/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem 2>&1 | grep -o '<value>.*</value>' | grep -Eo '([+-]?[0-9]+)'"
      unit_of_measurement: "W"
      device_class: "power"
      scan_interval: 5
      command_timeout: 5

  - sensor:
      unique_id: xcel_meter_consumption
      name: "Smart Electric Meter Consumption"
      command: "OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/3/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem 2>&1 | grep -o '<value>.*</value>' | grep -Eo '[0-9]+'"
      unit_of_measurement: "kWh"
      value_template: "{{ value | multiply(0.001) | round(3)}}"
      device_class: "energy"
      state_class: "total_increasing"
      #scan_interval: 86400
      scan_interval: 5
      command_timeout: 5

  - sensor:
      unique_id: xcel_meter_productiion
      name: "Smart Electric Meter Production"
      command: "OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/2/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem 2>&1 | grep -o '<value>.*</value>' | grep -Eo '[0-9]+'"
      unit_of_measurement: "kWh"
      value_template: "{{ value | multiply(0.001) | round(3)}}"
      device_class: "energy"
      state_class: "total_increasing"
      #scan_interval: 86400
      scan_interval: 5
      command_timeout: 5

I can poll the xcel power meter manually with the following command from a terminal window in 2024.7.2, but at restart, the sensors are not created by configuration.yaml command_line commands.

Here are the logs:

Logger: homeassistant.components.command_line.utils
Source: components/command_line/utils.py:56
integration: Command Line (documentation, issues)
First occurred: 12:15:12 PM (789 occurrences)
Last logged: 12:37:32 PM

Command failed (with return code 1): OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/1/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem 2>&1 | grep -o '<value>.*</value>' | grep -Eo '([+-]?[0-9]+)'
Command failed (with return code 1): OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/2/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem 2>&1 | grep -o '<value>.*</value>' | grep -Eo '[0-9]+'
Command failed (with return code 1): OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/3/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem 2>&1 | grep -o '<value>.*</value>' | grep -Eo '[0-9]+'

I can execute the command_line command manually from a terminal window and the command works.

[core-ssh config]$ ./comman.txt
<Reading
     xmlns="urn:ieee:std:2030.5:ns"
     href="/upt/1/mr/3/r">
    <qualityFlags>01</qualityFlags>
    <timePeriod>
        <duration>1</duration>
        <start>1720636845</start>
    </timePeriod>
    <value>20758668</value>
</Reading>
[core-ssh config]$ cat comman.txt
OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/3/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem
[core-ssh config]$

I don’t know if this helps or not, but when I try to execute with a command_line command manually, I get an error.

That’s why I had to create the txt file and execute it with ./comman.txt

It’s probable unrelated.

Welcome to the Home Assistant command line.

System information
  IPv4 addresses for wlan0: 
  IPv4 addresses for end0:  10.0.0.10/24
  IPv6 addresses for end0:  2601:282:1900:3a50::a169/128, 2601:282:1900:3a50:76d2:a882:3bbc:4458/64, fe80::fe8e:cb19:c3ea:fe7d/64

  OS Version:               Home Assistant OS 12.3
  Home Assistant Core:      2024.7.2

  Home Assistant URL:       http://homeassistant.local:8123
  Observer URL:             http://homeassistant.local:4357
➜  ~ cd config     
➜  config ls
a                         cookies.txt               home-assistant.log.fault  known_devices.yaml        tts
automations.yaml          custom_components         home-assistant_v2.db      photos                    www
blueprints                deps                      home-assistant_v2.db-shm  scenes.yaml               xcelcerts
comman.txt                home-assistant.log        home-assistant_v2.db-wal  scripts.yaml              zigbee.db
configuration.yaml        home-assistant.log.1      index.html                secrets.yaml
➜  config cat coman.txt 
cat: can't open 'coman.txt': No such file or directory
➜  config cat comman.txt
OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/3/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem
➜  config OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/3/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem
curl: (35) OpenSSL/3.3.0: error:0A000410:SSL routines::ssl/tls alert handshake failure
➜  config 

1 post - 1 participant

Read full topic

Is it possible to set the time to an entity in an automation?

$
0
0

I’m attempting to set the for/seconds value to an entity…

image

however, I get “Message malformed: expected float for dictionary value @ data[‘for’][‘seconds’]”. I thought that casting it as a float would fix it but that did not work.

Any suggestions?

BTW: this is part of an automation to reset PIR sensors that get stuck on.

7 posts - 4 participants

Read full topic

Add door sensor to a lock to get 'open'?

$
0
0

I have a few door locks, but none support knowing if the door is actually open. However, I do have binary_sensors on each door, though.

I’d like to combine these so:

  1. I can see a single icon/status showing locked, unlocked, or door open
  2. I can see history of door locked/unlocked/open from the same pop-up
  3. I still retain the lock/unlock control (“more info” pop-up)

I can do (1) using a lovelace template card (in fact, I do). I can do (2) with a template sensor. However, both of those don’t handle (3).

It seems like the thing preventing all 3 is that the lock.template doesn’t support “open”.

Am I missing something obvious, because this seems like something a lot of people would want?

1 post - 1 participant

Read full topic

KNX Bustraffic at startup

$
0
0

Hello everyone,

is there an posibillity to reduce KNX bustraffic at startup of home assistent?

In the start up procedure I have to sync a lot of KNX adresses and that floods the bus and so the traffic is very high with the result that not all adresses could be synced.
So I’m looking for a solution that limits the groupvalueread_requests from HomeAssistant.
For me it is not a problem wenn it tooks some seconds longer to get al values from the bus.

2 posts - 2 participants

Read full topic


Tuya authentication expired

$
0
0

After the update to HA 2024.7.2 I get this error
image

When I scan the QR code using the Tuya smartlife appliction, it says the QR code has expired, probably because HA generates this when the error was produced, a few days ago.

When I click the reconfigure button, the QR code appears
How can I delete and reinstall the integration, or refresh the QR code ?

Update/Solution:

I just rebooted HA, and scanned the QR code immediately after the reboot, and then the authentication worked.

I decided to post this, even when I found the solution myself now, but perhaps it can help others who encounter the same problem.

1 post - 1 participant

Read full topic

Count times AC is idle in the last hour

$
0
0

Hi, I’m trying to count the number of times my AC is idle in the last hour. Following this post, I’m using a template to create a sensor for this with type: count, but I’m not able to find the sensor’s state in the developer tools. I’m assuming this is because the conditions are never satisfied, so there’s no data for it. I’ve verified that the when the AC is not running, hvac_action is idle, and that {{ now() - timedelta(hours=1) }} does properly produce a timestamp from an hour previous. Is there anything obviously wrong with my template?

template:
  - sensor:
    - platform: climate
      name: "Idle Count One Hour"
      entity_id: climate.hallway
      attribute: hvac_action
      state: idle
      type: count
      start: "{{ now() - timedelta(hours=1) }}"
      end: "{{ now() }}"

1 post - 1 participant

Read full topic

Question about migrating Z-wave

$
0
0

Good afternoon,
I have a hopefully quick/easy question. I’m planning on migrating my Home Assistant to new hardware. I plan on using the same Aeotec Z-Wave stick, and the plan is to restore my HA backups to the new hardware. Do I need to do anything special to ensure my z-wave is migrated to the new hardware?

2 posts - 2 participants

Read full topic

How to get the first letter of an input_text

$
0
0

Hi all,

depending on the first letter of an input_text I want a different icon…

How can I cover that first lettter ?

5 posts - 2 participants

Read full topic

Physical button for activating Assist, and use existing media player as output

$
0
0

Hi all, I was just wondering if anyone had any thoughts about the best way to achieve the following…

I have an ESP based satellite in the office, which works fine, but I sometimes feel like it would be easier to just press a button on my desk, which would activate the satellite, instead of using a wake word.

I was just wondering if anyone’s done anything similar? I have for example a spare SmartThings button doing nothing right now, and was wondering if I could use that to activate assist on the existing office satellite?

Any thoughts would be most appreciated :slight_smile:

1 post - 1 participant

Read full topic

Viewing all 106607 articles
Browse latest View live


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