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

Reset / Cleanup Integration Sensor Entity List?

$
0
0

I recently integrated a pair of Emporia Vue energy monitors into my HA and during the initial process, I used the default YAML code and iterated it until I got the system working correctly.

The problem I am running into is it appears that every time I changed the name of a sensor the new entity was added but the old entity wasn’t actually removed. So my integration shows as having 59 entities with only ~34 actually being valid.

I can manually remove the erroneous ones one by one in the settings, but I was wondering if there was a better way to handle this that didn’t involve me completely wiping all of the data for the existing sensors as well?

1 post - 1 participant

Read full topic


Binary Sensor if any sensors in a group go Unavailable or Unknown

$
0
0

Hi Folks. I have a list of entities in a group.

In groups.yaml

CHHW_Sensors:
  - sensor.tank_top
  - sensor.tank_middle
  - sensor.tank_bottom
  - sensor.tank_inlet
  - sensor.tank_outlet
  - sensor.landing

I am trying to create a binary sensor or sensor that goes ‘true’ or ‘on’ if any goes unknown or unavailable

This was my attempt in configuration.yaml

template:
  - binary_sensor:
      - name: Boiler Faults
        state: >
          {{ is_state('group.CHHW_Sensors')|selectattr('state','in',['unavailable','unknown','none']) }}

Any help?

2 posts - 2 participants

Read full topic

Ideas to solve a weird smart shades problem

$
0
0

Hi, I have a somewhat weird issue and I’m hoping someone has an idea to solve it. I have Lutron shades in my living room that I automate to close every night when I go to bed. If I forget to close them or I’m not at home, there’s a backup automation that makes sure they close before sunrise because if they don’t, the sun bakes my living room through my terrible single pane windows. It also fades books and furniture.

The ledge/sill that the shades rest on is very wide and runs the entire length of the room, so I often put snacks and drinks on it while watching TV. Occasionally, I’ll leave a half-finished drink on the ledge and go to bed, which if I’m not careful, can result in the shades knocking the drink over when they come down.

My current workaround is to just never have the shades lower all the way in an automation, but that’s annoying me since most of the time there’s nothing on the ledge, and even leaving them partly open lets in a lot of heat. So I’m trying to think of a way for the shades to detect collision and stop lowering immediately, or to rig some kind of sensor that would know if something is on the ledge.

Any ideas?

3 posts - 2 participants

Read full topic

Home Assistant Container seems Empty

$
0
0

I’ve been using HA for a long time on a raspberrypi and am now trying to move over to my dedicated server. I spun up a docker (technically podman) container by issuing the following from the documentation:

docker run -d --name homeassistant --privileged --restart=unless-stopped -e TZ=America/New York -v /var/homeassistant:/config --network=host ghcr.io/home-assistant/home-assistant:stable

Everything goes smoothly and it spins up a container. Container is running with no alerts or errors. I try to reach 12.7.0.0.1:8123, no luck, same for localhost:8123 and all other variations thereof.

When I pull up the terminal in the container and have a look around, I don’t see anything in there related to home assistant. Am I being daft? All instructions are super basic, spin up the container, start it, log into webUI…

I’m desperate, any help is appreciated.

3 posts - 2 participants

Read full topic

Configure color control of an RGBW led strip with a remote

$
0
0

Hello,
I have already tried some automations but I am a novice user.

I have an RGBW zigbee LED strip from Lidl and a STYRBAR remote from Ikea, connected to home assistant through zigbee2mqtt. I would like to set up an automation that would allow me to switch from one color to another by clicking on the left and right buttons of the remote. The idea would be to browse in one direction or the other and with each click, in a list of colors / modes such as “cold, neutral, hot, red, green, blue, rainbow”. When I succeed I will also try to take into account the colors that are not exactly one of the modes, looking at what is the closest mode in case the previous color has been set from the application. I imagine I could do a very long if else nesting but I think there is a more elegant solution and I’m coming to you hoping you can point me to some features, useful methods and examples.

Thanks in advance for your help.

1 post - 1 participant

Read full topic

Scale String-Value for HVAC

$
0
0

Hello World,

currently I started fresh to work with home assistant for the first time.

For my appartment I have bought following HVAC products:

BHT-002-GBLW → For single frame
https://smart-life24.de/produktwelt/wlan-smart-raumthermostat-sl06116w/ → For multiframe

I also installed HACS, tuya local and this plugin:

After all the BHT-002 works well.

The SL06116W is different, here “current temperature” and “target temperature” are scaled 10 times.

I expect the vale 21.5 and get 215.

Is there a possibility to setup or to fix in code?

1 post - 1 participant

Read full topic

How to define a service for a Modbus integration

$
0
0

Hi everyone,

I want to set the temperature of my Heating Boiler via Modbus TCP. I successfully read a couple of values via Modbus TCP from this boiler, but I have serious trouble understanding how to write variable to the boiler.

I want do do this, via PyScript (which also works already) because I think python is way easier then these pesky yaml files.
So from what I gather, I just need to define a Modbus service, which I then can call from pyscript. But I cannot figure the following to things out:

  • How the hell is it possible to define a standalone service? I tried the following, but it just gives an error that there is no integration called service
automation: !include automations.yaml
service: modbus.write_register
data:
  address: 2305
  unit: 1
  hub: SolvisRemote
  value: 50
  • And second, how can I tell the service that it shall have the temperature as an argument (which I set over pyscript)?

Sorry if this is a stupid question, but I really have problems understanding the yaml files correctly. As far as I understand, services are always part of an automation with trigger etc. but, that makes no sense to me…

Best,
Phil

1 post - 1 participant

Read full topic

HTTP and HTTPS access with reverse proxy not working

$
0
0

Hi guys, I’am trying to access my HA with my own domain name using a reverse proxy. So by reading the documentation I’ve been able to write this config:

http:
  ssl_certificate: /config/certs/fullchain1.pem
  ssl_key: /config/certs/privkey1.pem
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.17.0.2
    - 192.168.50.0/24

This kinda works, I can get to the HA auth page both using HTTP and HTTPS, but once I login I just get this:

I’ve checked the logs and I don’t see anything except an error while trying to read my yeelight bulb properties.

4 posts - 2 participants

Read full topic


Getting Kilowatt Hours

$
0
0

This is my first time using any device which can report power usage. In this case, a smartplug I got from Aliexpress.

computer power sensor

It looks to me like the polledsmartenergysummation sensor is what I’m looking for. But, of course, it just gives me a continuously updating readout in some unit of measure I don’t know. Ideally I’d like to end up with a chart showing kilowatt hours used per period (hour/day/week/etc). Can someone point me in the right direction?

Thanks in advance

1 post - 1 participant

Read full topic

Cannot change temperature unit of measure

$
0
0

I used to be able to click on a temperature entity and select the unit of measure to use. In general I use metric units but prefer Fahrenheit for temperature.

Recently, I had to drop one of my devices and re-add it. Now, I cannot change the unit of measure. The dialog box options are still there, they just don’t change anything – the front-end remains in celsius no matter how many times I tell it to use Fahrenheit or Kelvin.

All my other temperature sensors which I had previously configured to use Farenheit still do. It’s just the newly re-added one which fails to change.

Is this a new bug or has that feature been removed/changed?

Thanks in advance

1 post - 1 participant

Read full topic

SHASS / total consumption sensor

$
0
0

Hello,

since some sort of update my energy dashboard got 2 days of missing stats i just wanted to try another approach.

On 24th i updated my Shelly devices and HA (2022.8.6 and now i’m on 2022.8.7). Since then i did not get any stats on my energy dashboard. The current consumption was still working but not the total consumption (on the other side, the 3rd party SHASS got broken a little somehow, reinstalling and readding the device worked, did it only for one device yet).

My question is, how can i get the same sensor for total consumption by using the current consumption of one device. There is some built in function for that (as far as i know). Since i started using HA (few weeks ago) the whole stats for it are there. Maybe someone can guide me through or give me an example of his setup.

Nice greetz and thanks in advance :wink:

(Sry if it’s not properly written, my native language isn’t english :rofl:)

1 post - 1 participant

Read full topic

How to improve tts script with variable

$
0
0

I want to make a script which I can call from automations, to call the tts service. The reason I need this, I’ll have conditions etc to change which speakers to use. Eg now I have a test toggle, it only beeps 1 speaker instead of all.
Later I want to do other things, volumes, etc.

alias: Announce
sequence:
  - if:
      - condition: state
        entity_id: input_boolean.test_mode
        state: "on"
    then:
      - service: tts.google_cloud_say
        data:
          entity_id: media_player.bedroom_speaker
          message: "{{ message }}"
      - stop: ""
    else:
      - service: tts.google_cloud_say
        data:
          entity_id: media_player.all_speakers
          message: "{{ message }}"
mode: queued

It works. I call it with

service: script.announce
data:
  message: hello.

But it doesn’t really support the gui. Is there a way to change this so I can call service, and it pops up a place to type in the message, and I don’t have to remember to start with "message: " each time?

1 post - 1 participant

Read full topic

Complex motion - light automation

$
0
0

Trying to convert my tuya to HA.

at night:

  • If motion, turn on light
  • Set brightness based on time - but only if turned on by automation
  • No motion for 1min, turn off - but only if turned on by automation

It sounds simple, but I have this quite a bit mess so far:

alias: Motion1
trigger:
  - type: motion
    platform: device
    entity_id: binary_sensor.upstairs_sensor
    domain: binary_sensor
    id: start
  - type: no_motion
    platform: device
    entity_id: binary_sensor.upstairs_sensor
    domain: binary_sensor
    for:
      hours: 0
      minutes: 1
      seconds: 30
    id: stop
condition:
  - condition: or
    conditions:
      - condition: sun
        before: sunrise
      - condition: sun
        after: sunset
        enabled: true
    enabled: true
action:
  - if:
      - condition: trigger
        id: start
      - condition: device
        type: is_off
        entity_id: light.library_module_light
        domain: light
    then:
      - if:
          - condition: time
            before: "22:00:00"
            after: "00:00:00"
        then:
          - type: turn_on
            entity_id: light.library_module_light
            domain: light
            brightness_pct: 35
        else:
          - type: turn_on
            entity_id: light.library_module_light
            domain: light
            brightness_pct: 15
      - delay:
          hours: 0
          minutes: 1
          seconds: 0
          milliseconds: 0
      - type: turn_off
        entity_id: light.library_module_light
        domain: light
  - if:
      - condition: trigger
        id: stop
    then:
      - if:
          - condition: numeric_state
            entity_id: light.library_module_light
            attribute: brightness
            below: "128"
        then:
          - type: turn_off
            entity_id: light.library_module_light
            domain: light
          - type: turn_off
            entity_id: light.socket_1
            domain: light
        enabled: true
    enabled: true
mode: restart

It works sometimes, other times the light is left on forever. It’s got a crap hack to guess if it’s on due to automation or me.
I thought I’d ask for help before making it any longer.

1 post - 1 participant

Read full topic

Alexa notify automation for more than one entity

$
0
0

I have the following automation:

- alias: 'Garage: Notify Open'
  id: b4dddc0a-1212-42ac-aba5-75236ed4c498
  trigger:
    - platform: state
      entity_id: cover.small_garage_door_homekit
      to: open
      for: "00:00:10"
  action:
    - repeat:
        until: "{{ is_state('cover.small_garage_door_homekit', 'closed') }}"
        sequence:
          - service: notify.alexa_media
            data:
              data: { type: announce }
              message: 'Small garage door is open'
              target: media_player.everywhere
          - delay: "00:00:30"

The goal is to announce on all echos in the house when my garage door has been open for a certain period of time. That announcement should be repeated (with a delay) for as long as that door remains open.

The above YAML works fine for a single garage door, but I have two doors. I could simply copy & paste this for the 2nd entity, but I’m worried about two announcements happening at the same time, assuming both doors are opened simultaneously.

Is there a clever way to combine both entities into this logic? I’d be OK with 1 interval/timer to handle 2+ doors, and the message just changes depending on the combination:

  • Both doors open: “Big and small garage doors are open”
  • Only small garage door open: “Small garage door is open”
  • Only big garage door open: “Big garage door is open”

This is just a thought; I am open to whatever is easiest / most reasonable.

1 post - 1 participant

Read full topic

Securing Server Room

$
0
0

What would you guys recommend for security a server room with home assistant. I have a small room that has all my racks etc and don’t want any little people in there shutting off random blinking lights / buttons. Would love to just have an NFC card that I could scan with my phone and have it release a magnetic lock. However if any child got into the room for whatever reason, they would need to be able to get out just by opening the door … thoughts on what might be able to get this job done?

2 posts - 2 participants

Read full topic


Nest integration configuration flow permanently stuck

$
0
0

I added the Nest integration, whose setup flow prompted me to follow the Nest integration instructions. I completed all of the steps (configuring OAuth, creating a Nest Device Access project, paying the $5 fee, etc.) to the point where I have a Device Access Project ID.

Unfortunately I didn’t have time to complete this in one sitting, so I canceled the setup flow in HA and returned later once I had the Device Access Project ID. Now, however, I can no longer add the integration; it gives me an “Aborted” error with the message “The component is not configured. Please follow the documentation.”

It seems that partially completing the setup process has persisted some state that is preventing me from continuing or starting the setup flow from the beginning. Does anyone know where that state is, so I can remove it?

1 post - 1 participant

Read full topic

Publish temperature to radiothermostat

$
0
0

My Radiothermostat ct-50 supports remote temperatures via http:///tstat/remote_temp. I was wondering if the radiothermostat integration supported added a remote temp from homeassistant? I’ve looked but I can not find any documentation about this capability.

I’m attempting to user thermometers I have around the house to focus cooling on occupied rooms and the remote temp API call seems like a good way to do this. I could also publish to MQTT and use an external application to republish the temperatures to the thermostat but this seems inelegant at best.

Thanks

1 post - 1 participant

Read full topic

HACS disappeared from menu but still seems to work

$
0
0

I recently updated to core_2022.8.6 and HACS seems to have disappeared in the process.
The reason for this “disappearance” is clear: I get the following errors in my log:
Error setting up entry for hacs

Logger: homeassistant.config_entries
Source: util/json.py:45
First occurred: 9:52:14 PM (1 occurrences)
Last logged: 9:52:14 PM

Error setting up entry for hacs
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/json.py", line 39, in load_json
    return orjson.loads(fdesc.read())  # type: ignore[no-any-return]
orjson.JSONDecodeError: unexpected character: line 23902 column 44 (char 780993)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 357, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/hacs/__init__.py", line 223, in async_setup_entry
    setup_result = await async_initialize_integration(hass=hass, config_entry=config_entry)
  File "/config/custom_components/hacs/__init__.py", line 209, in async_initialize_integration
    await async_try_startup()
  File "/config/custom_components/hacs/__init__.py", line 196, in async_try_startup
    startup_result = await async_startup()
  File "/config/custom_components/hacs/__init__.py", line 153, in async_startup
    if not await hacs.data.restore():
  File "/config/custom_components/hacs/utils/data.py", line 120, in restore
    repositories = await async_load_from_store(self.hacs.hass, "repositories") or {}
  File "/config/custom_components/hacs/utils/store.py", line 49, in async_load_from_store
    return await get_store_for_key(hass, key).async_load() or {}
  File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 116, in async_load
    return await self._load_task
  File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 125, in _async_load
    return await self._async_load_data()
  File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 143, in _async_load_data
    data = await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/util/json.py", line 45, in load_json
    raise HomeAssistantError(error) from error
homeassistant.exceptions.HomeAssistantError: unexpected character: line 23902 column 44 (char 780993)

and Could not parse JSON content: /config/.storage/hacs.repositories

Logger: homeassistant.util.json
Source: util/json.py:39
First occurred: 9:52:14 PM (1 occurrences)
Last logged: 9:52:14 PM

Could not parse JSON content: /config/.storage/hacs.repositories
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/json.py", line 39, in load_json
    return orjson.loads(fdesc.read())  # type: ignore[no-any-return]
orjson.JSONDecodeError: unexpected character: line 23902 column 44 (char 780993)

However, the weird thing is that, if I access HA locally, I get a whole series of “custom element does not exist…” errors as I’d expect if HACS were missing. But if I access HA via nabu casa, everything works as it did before the update.
Any idea on what is going wrong and, more importantly, how to fix it?
Thanks.

1 post - 1 participant

Read full topic

Get sensor time elapsed on last status on notify

$
0
0

Hi, I have a sensor that detect when my home power from grid is down or up. I have a notification system to inform to me about the status change of that. Now, how can I put in the template system the elapsed time of the sensor on down (false) state?.
I’m currently using this template:

{{ (as_timestamp(now()) - as_timestamp(states.sensor.grid_power_live.last_changed)) | timestamp_custom("%H:%M", false) }}

But the problem with this is that when notification activate, render the template but in that time the last_changed is the new state, not the oldest state, so always send on the notification the elapsed time from the new state.
The notification that i want need to say something like “Grid Power on: elapsed time in off state: {{ template method to get that info }}

1 post - 1 participant

Read full topic

Password forgotten

$
0
0

Hi,

I forgot my password but i am logged in HA.

I made a new person and now i can login with this new person but i want my old USER back!!

But how? In the description of locked out you have to create annew person an then you should reset the password of your old User?! But there is now option to reset the pass of the old User/owner?!

How can i get it back??

2 posts - 2 participants

Read full topic

Viewing all 108978 articles
Browse latest View live


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