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

Rounding of temperature values

$
0
0

Hi, one of my devices show the temperature and humidity with a lot of decimal how can round to only 2 decimals in the following code?

custom_fields:
temp: >
[[[ return
states[‘sensor.ble_temperature_govee_termometro_higrometro’].state +
‘°C’ +’ | '+
states[‘sensor.ble_humidity_govee_termometro_higrometro’].state +
‘%’]]]

Thanks in advance

1 post - 1 participant

Read full topic


Calculate heating equivalent hours

$
0
0

Hello

In my job (renewable energies) there is a concept named equivalent hours, that is the hours at maximum power needed to produce the energy produced by WTG in a timerangee. As the wind turbine production depends on the wind speed, cannot produce always at full power and it’s an easy way to see how much powerdensity has a location during a period of time.

I want to use the same concept to my heating system. I live in an apartment with central heating system. There is a central circuit of hot water and each department is connected through a TRV valve controlled by a thermostat inside the apartment. My Tado thermostat is sending an % command to the TRV to open a %, so it lets a percentage of the maximum water (and heat) to my apartment. It’s very helpful to avoid temperature overshootings but the heating hours statistics is not very helpful in this case.

I have configured an history_stats to register the time my thermostat is opening the valve following this post but it’s very different to have a 25% open than a 100%. So I want to use the equivalent hours concept to my heating. The idea is to apply the percentage to the time at each percentage and register it into history_stats, but I don’t how to implement it.

Any idea or suggestion on how to do it would be very helpful.

1 post - 1 participant

Read full topic

System_log_event: any way to disable to record them into DB?

$
0
0

Errors & warnings in case of any failures are flooding DB.
They may be generated really fast → DB is flooded → DB is growing → no space left on a device

These messages could be like:

{“name”:“homeassistant.helpers.entity”,“message”:[“Update for sensor.htpc_asus_z170_a_nuvoton_nct6793d_temperatures_temperature_6 fails”],“level”:“ERROR”,“source”:[“helpers/entity.py”,942],“timestamp”:1708058055.8718996,“exception”:“Traceback (most recent call last):\n File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 942, in async_update_ha_state\n await self.async_device_update()\n File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1261, in async_device_update\n await hass.async_add_executor_job(self.update)\n File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run\n result = self.fn(*self.args, **self.kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/src/homeassistant/homeassistant/components/openhardwaremonitor/sensor.py", line 104, in update\n values = array[path_number]\n ~~~~~^^^^^^^^^^^^^\nIndexError: list index out of range\n”,“count”:1,“first_occurred”:1708058055.8718996}

and I see no use for them in DB.
And these old records are not purged on HA reboot.

That particular message was about OpenHardwareMonitor.
The integration is updated every 30 sec (by default), this message comes for every sensor (let it be 20 sensors).
When smth bad happen with HA/setup - amount of records within a minute could be very much higher, other integrations, other components of HA, …

Is there any way to block these messages from being recorded into DB?

I guess someone may start saying here “you should find out a reason of these errors/warnings instead of asking silly question”. Thank you, Cap, this kind of advice not needed. Finding reasons is another task.

1 post - 1 participant

Read full topic

Increase an image size

$
0
0

Hi, I’m new to configuring the home assistant, I want to place an image but it’s too small, can anyone explain how I can change the size. Thanks

1 post - 1 participant

Read full topic

Automation to turn on lights if any other lights are on at sunset?

$
0
0

My goal is to have a sunset automation to check if any lights are currently on (in lieu of an occupancy type sensor), and if so, also turn on my living room light group. Is there a more efficient way to do that than I have here? Thank you!

alias: Living Room at Sunset
description: Turns on the living room 30 minutes after sunset if other lights are on.
trigger:
  - platform: sun
    event: sunset
    offset: "00:30:00"
condition: []
action:
  - if:
      - condition: template
        value_template: "{{ lightsThatAreOn | count > 0 }}"
    then:
      - service: light.turn_on
        target:
          entity_id: light.living_room
        data:
          brightness_pct: 100
variables:
  lightsThatAreOn: |
    {{ expand(states.light)
      | selectattr('state', '==', 'on')
      | map(attribute='entity_id') 
      | list }}
mode: single

5 posts - 3 participants

Read full topic

Template for triggered automation

$
0
0

I’d like some help understanding how to use a template in the action section of an automation to use the trigger in the action.

So, in example…
Trigger: ‘bedroom light’ changes to ‘on’
Conditions: …
Action: ‘Notification, {{ triggering entity (bedroom light) }} turned on.’

I’d like to use this in several different automations but don’t fully understand how to accomplish it.

I’d really appreciate some help, thanks!

2 posts - 2 participants

Read full topic

Pure HA+Thread, "Border Router required"

$
0
0

I’m starting from scratch with HomeAssistant in a KVM, with a SkyConnect USB passed-through. I have no Apple Homekit or any other network/border router. I’m trying to build a pure HomeAssistant + Matter/Thread system.
This is how my Thread looks:


I followed the official guides to get the ZigBee deactivated and Thread activated instead, and to set things up this far.

Now when I try to add my first Thread device (a new Eve smart plug) using the iOS app, it says I need a Thread Border Router in my network. Why does the iOS app not know about the border router I have? How can I make it know?

Any help is appreciated, and please remember I’m new to this, so if there is anything obvious that I might have overlooked, that’s totally a possibility.

1 post - 1 participant

Read full topic

How to add daily electricity charge to energy dashboard

$
0
0

On my monthly energy bill the electric company charges something like €0.78c for every day.
I’d like to add it that 78c charge to each of my daily running costs on the energy dashboard but no idea how go about doing that.
How are people doing it?

image

1 post - 1 participant

Read full topic


Simple templating question for last_changed

$
0
0

Can I template the last changed attribute of an entity_id?

e.g. If I pass a script a variable which is an entity_id can that script then determine the last changed value for that entity?

service: script.my_script
data:
  triggered_by: trigger.id

In script.my_script is there a correct syntax to do this?

- condition: template
  value_template: >
    {% set last_changed = states.triggered_by.last_changed %}

2 posts - 2 participants

Read full topic

Nortek HUSBZB-1 ZWave full reset

$
0
0

After an extremely frustrating time (HA Yellow just…“stopped working” in the middle of a day) I finally got things restored…kind of. Except that HA-Y refused to recognize the ZWave stick. Despite trying to uninstall, read logs, reinstall, tweak, change USB ports and a whole lot of other VERY frustratingly poorly documented things…I finally found the answer that worked (somewhere else here): delete the device, delete everything you can related to Zwave.JS and remove the dongle. Reboot. Then reboot again with the dongle in and let it “discover” it…reinstall…Boom! All good.

Bizarre that there is no effective “complete uninstall” method documented.

1 post - 1 participant

Read full topic

Check if time of helper has passed

$
0
0

How can I check if the datetime of helper has passed?
Checking for time doesnt work, because it only checks time, not date.
And this also doenst work

condition: template
value_template: now() > input_datetime.nextclean

1 post - 1 participant

Read full topic

Transparant background behind GIF file

$
0
0

i was wondering if i can get the left card have a transparent background

The left card is a gif file but i would like to have a bg transparant aswell:

image
The right card (the title =)

type: custom:mushroom-title-card
title: ⠀Hello, {{ user }}
alignment: start

Full Code:

square: false
type: grid
cards:
  - type: custom:mushroom-template-card
    primary: ''
    secondary: ''
    icon: ''
    picture: /local/icons_docker/iiidefconiii.gif
    fill_container: false
    multiline_secondary: false
    layout: horizontal
    tap_action:
      action: url
      url_path: http://10.3.10.10:3123/
  - type: custom:mushroom-title-card
    title: ⠀Hello, {{ user }}
    alignment: start
columns: 2

1 post - 1 participant

Read full topic

Homeassistant.external:url in templates?

$
0
0

Hi Community,

I currently working on getting external access working. For that I would like to automate the process for updating the DNS record on my own domain. I have REST API access to the DNS server responsible for my domain.

My plan is to use an automation to update the DNS record with the IPv6 address if changed.
The IPv6 Address I‘m already getting.
Is there any way to get the configured External_URL to be used in a template? Currently I‘m using an additional input_text but then I have to change the URL on two points if I want to change them… I‘m not a friend of unnecessary redundancy, and maybe it‘s interesting to learn how to access the configuration metadata of home assistant.

Greeting.

1 post - 1 participant

Read full topic

Let‘s Encrypt Custom DNS API

$
0
0

Hi Community,

Is there a way to use a custom rest_command to set the DNS TXT record for the Let‘s Encrypt Addon?

1 post - 1 participant

Read full topic

Large config/core file - can I just delete it? Is it a core dump?

$
0
0

I just noticed that there’s a core file in my config directory that has been there since 2022.

[core-ssh ~]$ ls -lah ~/config/core
-rw-------    1 root     root        2.0G Oct 28  2022 /root/config/core
[core-ssh ~]$

From past experience this is usually when something crashes it dumps a core file out but I didn’t want to delete it and find out the hard way that it’s something used real-time by Home Assistant. Does anyone know if I can just remove this 2GB file without bad ramifications?

2 posts - 2 participants

Read full topic


Ecobee and api... Not getting anywhere

$
0
0

Hi-I am brand new to Home Assistant and my brain is 73 years old so this is a new challenge for me and my brain.
I want to add my ecobee to Home Assistant and I went to the website to get an API and entered my ecobee email address and password. The screen comes back to enter it again. So I did. And again, etc… It never goes any further. What am I doing wrong? Thank you, Judy

1 post - 1 participant

Read full topic

Reolink Camera cycles through feeds before landing on RTC

$
0
0

Here’s a video of what I’m talking about

In short, when I load the view with the camera feed, it starts with one feed, then switches to MSE, until finally landing on RTC.

I’m using a reolink doorbell with a frigate card. Here’s the YAML for the card…

type: custom:frigate-card
cameras:
  - camera_entity: camera.doorbell_fluent
    title: Doorbell
    webrtc_card:
      entity: camera.doorbell_fluent
      url: 192.168.60.162
    go2rtc:
      modes:
        - webrtc
    live_provider: webrtc-card
live:
  preload: true
  auto_play: visible
  lazy_unload: hidden
  auto_mute: hidden
menu:
  buttons:
    microphone:
      enabled: true

I’m just looking to find a feed that works quickly and loads only once, thanks!

1 post - 1 participant

Read full topic

Change homeassistant:8123 to custom url

$
0
0

I had HA installed on an Raspi3 and I was accessing it via http://myhome:8123.

I upgraded now to a Proxmox installation and migrated the in HA instance. That worked mostly, but now I can only access it via the IP address or http://homeassistant:8123

I’d like to go back to http://myhome:8123, however I cannot figure out how to do it
If I remember correctly I changed that in the Android app (I think the app even asked me if I want to change that) when set up HA on the Raspi. But it was a long time ago and I cannot find any setting to do it now.

Could someone please give me a pointer on how to do this?

3 posts - 2 participants

Read full topic

Urgent help Tuya

$
0
0

new Tuya integration not working for me updated everything and I still get login with developer setting how to I get login with Tuya smart app ?

1 post - 1 participant

Read full topic

Is it possible to map states to a human friendly value for a sensor?

$
0
0

I have a sensor that displays the current state of what my ducted heat pump is currently doing. The numerical statue values returned from the device are 0 = Fan/Idle, 1 = Heating, 2= Cooling. When someone opens the sensor the history shows the numerical state so they have to remember what number means what. It looks like this currently:
image

Is it possible to customise the current sensor so that the history shows a name I assign to each value instead, without having to make a new template sensor?

2 posts - 2 participants

Read full topic

Viewing all 105527 articles
Browse latest View live


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