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

Someone home sensor that tolerates 'unavailable' for tracker state

$
0
0

I am having trouble understanding how to modify my “someone_home” sensor to ignore the ‘unavailable’ or ‘unknown’ states. I am using Life360 for location tracking and whenever the service is unreachable, the sensor switches to no one is home. Here’s the sensor template code. What is the right way to identify both sensors (me and my wife) and ignore unavailable or unknown?

The intent is to not change the state of the someone_home sensor if either tracker is ‘unknown’ or ‘unavailable’. If there’s a better way to do this, I am open to ideas!

platform: template
sensors:
  someone_home:
    friendly_name: Someone Home
    icon_template: >-
      {% if is_state('binary_sensor.someone_home','on') %}
        mdi:home-account
      {% else %}
        mdi:home-outline
      {% endif %}
    value_template: >-
      {%- if (states('device_tracker.me') not in ['unavailable','unknown']) and (states('device_tracker.wife') not in ['unavailable','unknown']) -%}
        {{ is_state('device_tracker.me','home') or is_state('device_tracker.wife','home') }}"
      {%- else -%}
        {{ states('binary_sensor.someone_home') }}
      {%- endif -%}

1 post - 1 participant

Read full topic


How to access Energy Dashboard's displayed helpers?

$
0
0

The energy dashboard displays daily totals of used energy and gas:

In its configuration it only requires sensor totaling the energy and gas usage:


So I imagine that “under the hood” this dashboard uses various utility meter helpers:

These helpers are not visible under “Settings > Devices & Services > Helpers”

Of course, I could recreate them there, but since they already exist I would like to re-use them. Is that possible?

1 post - 1 participant

Read full topic

Nested IFs (conditions) within Frontend-Template

$
0
0

Dear Community,

I started with a frontend-.YAML: fe-og-kin2.yaml
I included a template-file using button_card_templates: !include button-card-templates.yaml
Within the template-file, I configured the following template to render my cover-buttons

schmiddy-cover:

    size: 30%

    icon: |

      [[[

        if (variables.function == "up")

          if (entity.state == "opening")

            return 'mdi:arrow-up-bold';

          else if (entity.state == "open")

            return 'mdi:arrow-up-bold';

          else return 'mdi:arrow-up-bold-outline';

        else if (variables.function == "stop")

          return 'mdi:pause';

        else if (variables.function == "down")

          if (entity.state == "closing")

            return 'mdi:arrow-down-bold';

          else if (entity.state == "close")

            return 'mdi:arrow-down-bold';

          else return 'mdi:arrow-down-bold-outline';

      ]]]

Using the variable ‘function’ I wanted to manage the button-design for up, pause and down.
But unfortunately the nested IF-statements don’t work properly.
I just don’t understand, why.

Which language is used between the brackets [[[ and ]]]?
Can anyone give me the hint and correct my code?
I would be very thankful.

Best regards

Lars

1 post - 1 participant

Read full topic

Trane ZWave thermostate not refreshing values

$
0
0

I have a Trane ZWave thermostat. Until yesterday, I had it connected to Smartthings, and I was able to set/read values in HomeAssistant via the ST integration.

I picked up the Nortek Zigbee/Zwave stick yesterday and started the process of completely moving off ST. I excluded the Thermostat from ST, and connected it to HASS - it is great. I can control the Thermostat just fine; however values are not updated “back” into HASS.

(I’m using ZWaveJS with the Zwavejs2MQTT frontend. Gateway is disabled, and WS is running)

When I go to the frontend, I can look at the details for the thermostat and click the Refresh button to manually update it. I have tried healing, and re-interviewing the device. Is there a known issue or configuration I need to set with Trane Thermostats to have data automatically refreshed?

To summarize: It connected fine. I control the thermostat. But as the state/temp/humid values change the values are not udpated in HASS unless I manually refresh them.

Thanks :slight_smile:

4 posts - 3 participants

Read full topic

Do you use HA push notifications or the ones that come out of the box?

$
0
0

Hello all!

Curious to hear peoples opinion and talk about their setup for push notifications.
I was wondering, do you consolidate all of your push notifications to come from HA or do you keep using the ones that come from whatever tech you have?

For example, Ring doorbell, should you just stick to using the push notifications from Ring to alert when there is motion or someone rings your doorbell, or do you move all that to HA?
Or maybe a mix since you likely have a custom sensor you want to be alerted by HA on, while keeping things like Ring doorbell notifications from the Ring app.

Hope that makes sense. Let me know!

2 posts - 2 participants

Read full topic

USB ports lost

$
0
0

This afternoon the USB connections get lost. (DeCONZ, Z-Wave JS, DSMR) . After a hard reboot (power-off) the work again. But three hours later suddenly all the USB connections are lost. I see this


in the Configuration part of Z-Wave JS in the Add on section. I expect to see: ‘device’: ‘/dev/serial/by-id/usb-0658_0200-if00’
and ‘/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2120509-if00’, and ‘/dev/serial/by-id/usb-FTDI_P1_Converter_Cable_P1HWLG8-if00-port0’

Logbook gives: Failed to set the Z-Wave JS add-on options: not a valid value for dictionary value @ data[‘options’]. Got {‘device’: ‘/dev/serial/by-id/usb-0658_0200-if00’

1 post - 1 participant

Read full topic

Removing a manually added state class

$
0
0

Where I’ve manually added a state class to a sensor, that sensor’s data is stored in the long-term stats table. If I now remove that state class (for whatever reason), does HA remember the state class (in the sense that its now part of the sensor’s config in the .storage files) and hence will keep recording long-term stats?

What would be my best recourse? Remove it from the storage files, and optionally delete the data from the DB manually?

1 post - 1 participant

Read full topic

Can't get ssh to work with key pair

$
0
0

hi there.

i can’t seem to get SSH authentication to work! maybe i’m making some mistake in my config, but when i remote in it just says

root@[redacted]: Permission denied (publickey,keyboard-interactive)

the config for the ssh/terminal add-on is this:

authorized_keys:
  - '!secret pop-os-ssh'
password: ''
apks: []
server:
  tcp_forwarding: false

and the key is in my secret file, it looks like this (obviously key redacted)

# Use this file to store secrets like usernames and passwords.
# Learn more at https://www.home-assistant.io/docs/configuration/secrets/

###############################
# SSH keys for remote access: #
###############################

# Public SSH key from Pop-OS:
pop-os-ssh: [redacted]

Is there something i’m doing wrong? i followed this guide for key generation (like it says in the doc):

and how can i debug whether SSH is actually giving the proper key?

1 post - 1 participant

Read full topic


New to HA and struggling with automation

$
0
0

Hi All,

So I am new to HA after being an ST user and I am trying to get my head around what feels like super complex processes for something I previously found a breeze to setup.

I have some Greenwave ZWave Plugs (UK), there is a post on here already about the issue where it flashing a green light when it receives no communication after x time.
Min 2 and max 255 mins.
The post mentioned about using a ping command, however it stats this has been changed to a push instead.

That’s fine, but I’m getting a little frustrated as I navigate through many help topics which only ever partially answer the solution.

The example on the original post was “here is some code to resolve the issue and pings it every hour”
That’s fantastic,
So how do I make that code an automation.

I’ve tried so many options to try and get the pin automation using the gui to get it to trigger a ping to the plug every hour and I can not for the life of me work out what is going wrong.

But when I compare the code it shows no intent or obvious target to the trigger for the automation.
I presume the trigger is choosing hour often it should run.

Please be aware I am new to this and I really need to hunt down answers that are guiding me through the process and not just. Here is some code.

I really don’t want to hand in the towel with HA as I’ve spent a chunk on new equipment for this but I’m already pulling my hair out and I’ve not even started digging into how I run the ST equivalent or “goodnight scene” putting the house in night mode etc. good morning for day mode.
I’m starting to think this might be many hours of work for something that took 5 mins in ST lol.

Eagerly awaiting some help :prayer_beads:

4 posts - 2 participants

Read full topic

Message malformed: Unable to determine action @ data['action'][0]

$
0
0

Hello all

I am trying to create an automation that will send me a push notification whenever the state of my front door changes.
When creating this, I have the trigger defined as this:

And the Action, I have it in YAML form as this:
action:

  • data_template:
    message: “Front Door {{ trigger.to_state.state }}”
    service: notify.notify

I keep getting this error when I try to save:
Message malformed: Unable to determine action @ data[‘action’][0]

What am I doing wrong?

3 posts - 2 participants

Read full topic

Supervisor died after Update

$
0
0

I have supervised HA setup, it runs on Rasperry Pi 4, 64x
After last update of Supervisor now it doesn’t work

Also i tried to switch to previous version of supervisor, but can’t maybe i do smth wrong, now have a lot of supervisor images

HomeServer:~ $ ha su logs
Get "http://supervisor/supervisor/logs": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

However i get logs via portrainer

22-08-03 00:16:05 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /core/info

22-08-03 00:16:05 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /supervisor/info

22-08-03 00:16:05 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /os/info

22-08-03 00:17:25 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /refresh_updates

22-08-03 00:17:25 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /info

22-08-03 00:17:25 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /core/info

22-08-03 00:17:25 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /supervisor/info

22-08-03 00:17:25 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /os/info

22-08-03 00:18:24 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /auth

22-08-03 00:18:39 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /info

22-08-03 00:18:39 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /host/info

22-08-03 00:18:39 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /store

22-08-03 00:18:39 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /core/info

22-08-03 00:18:39 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /supervisor/info

22-08-03 00:18:39 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /os/info

22-08-03 00:18:45 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /refresh_updates

22-08-03 00:18:45 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /info

22-08-03 00:18:45 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /core/info

22-08-03 00:18:45 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /supervisor/info

22-08-03 00:18:45 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /os/info

22-08-03 00:20:09 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /refresh_updates

22-08-03 00:20:11 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /info

22-08-03 00:20:11 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /core/info

22-08-03 00:20:11 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /supervisor/info

Guys please help to make supervisor alive

1 post - 1 participant

Read full topic

Girier 2 gang ON state after blackout

$
0
0

hi,
I have a UPS connected to my HA server, so the server keeps on… but the lights connected to Zigbee switches (2 gang Girier) appear as ON after a power outage. This is something I want to fix…
Anybody is using these devices (2 gang Girier) with the same behavior?

Regards

Chris

1 post - 1 participant

Read full topic

Zigbee2mqtt remote

$
0
0

Good afternoon. I have a Qnap Nas with Hassios installed and a sonoff coordinator and zigbeemqtt installed. This is at the entrance of my house.
On the other hand I have a powerful server away from the entrance of the house and connected to the Nas by mosquitto in bridge mode to see the zigbee devices.
I would like to be able to have zigbee2mqtt installed on the powerful server while keeping the coordinator on the nas at the entrance.

I have Hassios and I can’t install ser2net on the new versions.
Can someone tell me how to do it?

Thanks in advance to all the community.

1 post - 1 participant

Read full topic

Life360 Entities go unavailable until reload of integration

$
0
0

I’m running 2022.7.7, but I’ve had this issue with all 2022.7 builds.

Periodically if the internet flakes out, or perhaps an issue with life360 cloud, the entities for my people goes unavailable and they show as away in HA. If I ‘reload’ the integration they immediately recover and are ‘home’ again. Did not have this issue with the older-style integration on 2022.6 and prior.

I can reproduce the issue pretty consistently by killing internet access to HA and then restoring it. It requires a restart of the integration for the entities to update correctly again.

1 post - 1 participant

Read full topic

Testing AdGuard using canyoublockit.com. How to make it better?

$
0
0

I recently installed the adguard add-on and set it up. But when I use the canyoublockit.com site, I still see adds. Turn my AdBlockPlus on my browser back on and ads are gone. How can I make AdGuard better?

First picture it the site just using AdGuard. Second is using AdBlockPlus chrome add-on.


1 post - 1 participant

Read full topic


Using templates in automation blueprints to modify whole actions

$
0
0

I have a blueprint for a motion activated light type of automation. Most of the config was taken from the example though I wanted to extend it. For one I wanted it to firstly fade to half brightness and then after a second delay fade to off. That has so far worked very well apart from that brightness_step_pct does not change percentage in relation to current brightness but rather maximum possible brightness. So I used templates, to make an action, that calculates half-brightness based off of the current brightness of the entity:

- service: light.turn_on
  target: {{entity_id}}
  data:
    brightness: '{{state_attr(entity_id, "brightness") / 2 | int}}'
    transition: 1

Though as it turns out, the target selector returns an array of areas, devices and entities. The light service can deal with that though not the templates. To make it myself a little easier I created macros that encapsulate an action for an entity so I can more easily iterate through them. However when I tried to run them Home Assistant always fails with the unhelpful message “Invalid blueprint: required key not provided @ data['blueprint']. Got None”. So I tried to simplify the case and boiled it down to:

action:
  - delay: 1
  {% if true == false %}
  - delay: 10
  {% endif %}

Which still fails to evaluate. Is it even possible to use templates in that way? I know the blueprint gets re-compiled as an automation with the inputs replaced with the values entered from UI. But when and at which place are templates evaluated? Is there a more sane version to setting all lights in a target selector (=entities,devices,areas) to a given percentage of their current brightness? And for further debugging: is there a way to see how Home Assistant compiled a blueprint even if it did not create a valid automation? No matter what issue is at fault I almost always get the error message above which does not help in the slightest.

(I did test the templates in the developer tools which did create a valid automation configurations after compiling)

1 post - 1 participant

Read full topic

Unifi Direct device tracking stopped working

$
0
0

About a month ago, I posted this thread:

Thanks to your help, my home assistant was able to identify if any of 3 iPhones were connected to the home wifi, and if not, turn the lights off. Everything worked properly for several weeks. Yesterday, it stopped working.

I had been fiddling around in my network rack, turning off some of the equipment to cleanup the wiring and turning it back on. Everything is physically connected the same way it was before - just with less mess.

Home Assistant does not seem to know whether any of the 3 iPhones are connected to wifi.
Connecting or disconnecting the phones does not change their state within Home Assistant.

I realized that the access point did not have a static IP, so Home Assistant could be looking for an IP that didn’t exist. I fixed that by assigning the access point a static IP. Additionally, the 3 phones do not mask their MAC addresses.

This is using the Unifi Direct method of device tracking. My access point is a Unifi UAP-AC-Lite. And my Home Assistant is core version 2022.7.5 and operating system version 8.2, running on a Raspberry Pi 4.

Any ideas here?

The information below has the sensitive fields redacted :

Config.yaml:

device_tracker:
  - platform: unifi_direct
    host: IP_ADDRESSS_OF_ACCESS_POINT
    username: USER_NAME_OF_ACCESS_POINT
    password: PASSWORD_OF_ACCESS_POINT
    interval_seconds: 15
    consider_home: 180

Automation to turn off lights after 3 minutes if no one is home:

alias: Lights off when nobody home
description: ''
trigger:
  - platform: time_pattern
    minutes: /3
condition:
  - condition: state
    state: not_home
    entity_id: device_tracker.FIRST_IPHONE
  - condition: state
    entity_id: device_tracker.SECOND_IPHONE
    state: not_home
  - condition: state
    entity_id: device_tracker.THIRD_IPHONE
    state: not_home
action:
  - scene: scene.all_lights_off
mode: single

1 post - 1 participant

Read full topic

Tailscale wont

$
0
0

I am trying tailscale for remote access. Home assistant on RPi with cat6 for internet access but i keep getting this error in the logs any ideas?

2022/08/02 19:10:24 netstack: could not connect to local server at 127.0.0.1:80: dial tcp 127.0.0.1:80: connect: connection refused
2022/08/02 19:10:24 [RATELIMIT] format("netstack: could not connect to local server at %s: %v")

1 post - 1 participant

Read full topic

Google Assistant "upcoming changes to this IFTTT integration"

$
0
0

So it seems the Google Assistant IFTTT integration is about to be completely knobbled - with v2 you can only activate scenes as described here.

I am currently using it with variables like “hey google, add x to my shopping list” (for iOS) and “remember container n is x”. These are both similar to assistant’s native capabilities, but those don’t work how I want (eg. ‘remember’ just keeps adding not replacing and I can’t figure out how to clear or ask what’s in container n).

Hopefully they’re doing this because the capability for variables will be built into assisant, but I’m not holding my breath.

Are others in the same situation, and do you have thoughts on what to pivot to?

1 post - 1 participant

Read full topic

Nabu Casa Error: Login blocked: User is local only

$
0
0

I’ve signed up for the Nabu Casa trial and have the URL but get, “Error: Login blocked: User is local only”, when I log in with my HA username and password. Probably something I need to do or set in HA right?

edit: The log says this:

Logger: homeassistant.components.http.ban
Source: components/http/ban.py:125
Integration: HTTP (documentation, issues)
First occurred: 2 August 2022 at 20:30:10 (3 occurrences)
Last logged: 07:58:26

Login attempt or request with invalid authentication from localhost (127.0.0.1). (Mozilla/5.0 (X11; CrOS x86_64 14816.131.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36)

3 posts - 2 participants

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>