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

Help creating a line break

$
0
0

Hi,
I’ve created this basic template from searching around here that just changes the state based on the time of day.
As you can see in the picture (under the date) it shows the Good evening message all on one line but i would ideally like it split over 2 lines like…
Good Evening,
Hope you’ve had a good day.
I tried adding < b > and < p > (extra space added here as it made it bold lol) but i can’t figure out if it’s possible.
Thanks for any help

  - platform: template
    sensors:
      greeting:
        value_template: >
          {% set state = states('sensor.time') %}
          {% if '00:00' <= state < '06:00' %}
            Good Night !
          {% elif '06:00' <= state < '12:00' %}
            Good Morning
          {% elif '12:00' <= state < '18:00' %}
            Good Afternoon
          {% else %}
            Good Evening hope you've had a good day !
          {% endif %}

1 post - 1 participant

Read full topic


ZWaveJS Multicast - NoACK

$
0
0

I’m having stability issues with HA & Z-WaveJSMQTT using multicast.

The goal is to press one button and have every light in my living room turn on at once, or as close to this as possible.

Sometimes everything turns on almost simultaneously as expected–pretty amazing when this happens. Other times, there is a straggling device - about 25% of the time.

There doesn’t seem to be any pattern with which device causes the delays – I live in a small apt and have ~40 devices on the network; I don’t think it’s a “network issue” but I am lost at this point. I’ve tried healing, moving the hub to different locations, no difference.

I’m running a Raspberry Pi 4 64-bit home assistant supervisor, 8G ram, an Aeotec Gen5+ zwave stick.

The devices I’m trying to control are:

  • 8x Zooz ZEN32 Switches (500 series, switch modules)
  • 6x Minoston Smart Plug In Dimmers (700 series, dimmer modules)

My current automation is as follows:

alias: All Lights On
description: ''
trigger:
  - platform: event
    event_type: zwave_js_value_notification
    event_data:
      node_id: 5
      label: Scene 004
      value: KeyPressed
condition: []
action:
  - service: zwave_js.multicast_set_value
    target:
      entity_id:
        - switch.light_switch_kids_hallway
        - switch.light_switch_kitchen_remote
        - switch.light_switch_main_hallway
        - switch.light_switch_hallway_remote
        - switch.light_switch_living_room
        - switch.light_switch_kitchen
        - switch.plant_lights
        - switch.table_lights
    data:
      command_class: '37'
      property: targetValue
      value: true
  - delay:
      hours: 0
      minutes: 0
      seconds: 0
      milliseconds: 100
  - service: zwave_js.multicast_set_value
    target:
      entity_id:
        - light.track_lights
        - light.bar_cart_light
        - light.couch_light_right
        - light.couch_light_left
        - light.tv_lamp_left
        - light.tv_lamp_right
    data:
      command_class: '38'
      property: targetValue
      value: '99'
mode: single

I had to split this into two multicast_set_value commands because half of the devices are dimmers and the other half are switches and to the best of my knowledge, I’m unable to this in one go.

This is the error I see in my log:

Log Details (ERROR)

Logger: homeassistant.core Source: components/zwave_js/services.py:509  First occurred: 4:02:02 PM (1 occurrences)  Last logged: 4:02:02 PM
Error executing service: <ServiceCall zwave_js.multicast_set_value (c:b1b8433d1d8a91b5cec81f7b22925792): command_class=38, property=targetValue, value=0, broadcast=False, nodes={Node(node_id=44), Node(node_id=47), Node(node_id=37), Node(node_id=43), Node(node_id=40), Node(node_id=46), Node(node_id=36), Node(node_id=39), Node(node_id=45), Node(node_id=38)}>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1511, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/services.py", line 509, in async_multicast_set_value
    success = await async_multicast_set_value(
  File "/usr/local/lib/python3.9/site-packages/zwave_js_server/util/multicast.py", line 54, in async_multicast_set_value
    result = await _async_send_command(
  File "/usr/local/lib/python3.9/site-packages/zwave_js_server/util/multicast.py", line 29, in _async_send_command
    return await client.async_send_command(cmd, require_schema)
  File "/usr/local/lib/python3.9/site-packages/zwave_js_server/client.py", line 79, in async_send_command
    return await future
zwave_js_server.exceptions.FailedZWaveCommand: Z-Wave error 204: One or more nodes did not respond to the multicast request (Status NoAck) (ZW0204)

Not sure where to begin - any help would be greatly appreciated!

1 post - 1 participant

Read full topic

Homekit Video Help (outside of LAN)

$
0
0

Hi,

I thought I had a setup that was working fully, but I guess I hadn’t looked closely enough when outside the LAN… So I thought to ask here in case there’s any tips on where I can look next…

My setup is as follows:

  • Latest Home Assistant running in Docker (auto-updated)
  • AppleTV 4K running as Homekit hub (no other hubs)
  • All Apple devices running latest OS.
  • Native Homekit devices are directly attached to Homekit
  • Non-native Homekit devices are bridge via Home Assistant
  • Home Assistant’s Homekit is setup via yaml file, following HA recommendations:
    — Devices such as switches, alarm, etc are setup together through one Homekit bridge via yaml
    —I have 4 cameras, each of these is setup as its own Homekit accessories via yaml
  • Home Assistant is NOT exposed to the Internet

The cameras are actually “centralized” by Blue Iris, which exposes http streams which HA calls to consume and expose.

Where it stands:

  • I can see all camera videos through Blue Iris desktop client (within LAN), as well as Blue Iris iOS App (both inside and outside the LAN)
  • I can see the camera videos through the HA App and Web Page when on LAN (as expected). Outside the LAN, of course via VPN they can also be seen.
  • When in LAN, in the Home App on iOS, as well as on the Apple TV, I can see the videos. No problem.

The issue:

  • From outside the LAN however, it’s super strange:
    — The still frame is shown
    — The audio can be heard
    — The video however is never started. Just holds on the still frame, which (sometimes?) updates every 10 seconds or so.

Has anyone experienced this, or solved it?
Any leads would be really helpful.

1 post - 1 participant

Read full topic

Circular Mean (averaging angles in a circle)

$
0
0

Hello,

An interesting math problem. I’d like to have a template sensor which averages the result of 3 incoming angle sensors, all reporting in degrees from 0-359.9. The circular mean is a special case since of course the correct answer for the average of a 350 degree reading and a 10 degree reading and a 0 degree reading is 0, but (350+10+0)/3 = 120… wrong.

There’s a formula described here on Wikipedia, but I’m not adept enough with template sensors to implement this. (average the sine, average the cosine, take the arctan of sin-avg/cos-avg) Anyone have an idea?

https://wikimedia.org/api/rest_v1/media/math/render/svg/9508e363cb63a0fb40bb1dbe85409588843e2465

1 post - 1 participant

Read full topic

Tuya - Just spinning no messages?

$
0
0

Hi
I have just followed the new guide and setup Tuya IOT and get all the services i need added. Got the keys and all that.
Tuya integration showed up automatically in latest (Jan 2022) version of HA.
I entered all the details and all that happens is the spinner spins and spinse.

I checked the supervisor logs and can not see any issues.

HA has normal internet access. It is running in HyperV hypervisor but I doubt that should matter much?

I have never had Tuya setup as this is a new project I want to start adding things into HA

What the heck is going on ? :frowning:

2 posts - 1 participant

Read full topic

Using images in badges based on state filter

$
0
0

Hi all - I am trying to display badges to show whether my users are home or away. I wanted to use badges not cards as the main purpose of this dashboard is to be displayed on a phone.

I wanted to show the user’s picture if the are home - or the same picture ‘greyed out’ if they are away. If I just put the user’s badge in like

- badges:
  - entity: person.matt

then I get the photo but it doesn’t change - only the words ‘home’ and ‘away’ appear on top of the badge.

If I create a state filter like this:

    badges:
      - type: entity-filter
        entities:
        - entity: person.matt
          name: Matt
          image: local/matt.png
          #icon: mdi:home-account
        state_filter:
        - "home"
      - type: entity-filter
        entities:
        - entity: person.matt
          name: Matt
          image: local/matt-away.png
          #icon: mdi:home-edit-outline
        state_filter:
        - "away"

Then my badges are just an an empty white circle. The image URL’s are definitely correct because if I use those same URL’s in a card they work fine. Furthermore - if I comment out the ‘image’ line in the code above and uncomment the ‘icon’ line then instead of an image or the blank white circle I get a badge with an icon which changes correctly with my home/away state.

Does anyone know if/how I can make the photo inside the badge change dependent on the user’s home/away state? I’ve googled and tried various suggestions about customize.yaml etc but nothing seems to work.

1 post - 1 participant

Read full topic

Trying to factory reset HA Blue, won't show up as mass storage

$
0
0

Hey everyone,

I’m ready to start over with Home Assistant after years of tinkering and learning, I’d like to start fresh.

I have the HA Blue for my device, and I am trying to follow along with these directions

and

I for sure have the dipswitch set to SPI and followed the directions to a “t” and running the command
“ums /dev/mmcblk0” does not throw any errors or the like.

But for the life of me I cannot get it to show up as an attached storage device on my either my Macbook (M1 Pro) or on my Windows machine (Surface Pro 4).

I’m not sure what else to do or diagnose at this point so I can reload a fresh copy of HA and it’s OS on here.

Any tips or gotchas to share? Thanks in advance!

1 post - 1 participant

Read full topic

Creating a date specific URL string in configuration.yaml

$
0
0

Hi,
I am trying to get tide info from NOAA to display on my dashboard using the “rest” sensor platform. I have to build a long URL string that contains today and tomorrow’s date. I figured out how to get the dates in the correct format:

{{ now().timestamp() | timestamp_custom("%Y%m%d") }}
{{ (now() + timedelta( days = 1)).timestamp() | timestamp_custom("%Y%m%d") }}

However, when I try to embed it in the string, the sensor no longer works. See below. tideValue1 doesn’t work but tideValue2 does.

  - platform: rest
    name: tideValue1
    json_attributes_path: "$.predictions.[0]."
    json_attributes:
      - t
      - v
      - type
    resource: >
        https://api.tidesandcurrents.noaa.gov/api/prod/datagetter?product=predictions&application=NOS.COOPS.TAC.WL&begin_date=
        {{ now().timestamp() | timestamp_custom('%Y%m%d' ) }}
        &end_date=
        {{ (now() + timedelta( days = 1)).timestamp() | timestamp_custom('%Y%m%d') }}
        &datum=MLLW&station=9410840&time_zone=lst_ldt&units=english&interval=hilo&format=json
    value_template: "{{ value_json[0].t }}"
  - platform: rest
    name: tideValue2
    json_attributes_path: "$.predictions.[0]."
    json_attributes:
      - t
      - v
      - type
    resource: https://api.tidesandcurrents.noaa.gov/api/prod/datagetter?product=predictions&application=NOS.COOPS.TAC.WL&begin_date=20220104&end_date=20220104&datum=MLLW&station=9410840&time_zone=lst_ldt&units=english&interval=hilo&format=json
    value_template: "{{ value_json[1].t }}"


1 post - 1 participant

Read full topic


Z-Wave PIR and automations

$
0
0

Hi Community!

I’ve been struggling for several years with this same problem and I’m not sure if it’s a matter of not seeing the forest through the trees.

I have several Z-Wave PIR sensors and they work perfectly fine for me. The problem I have is they all have a “cool-down” period before the binary_sensor that represents it changes states from ON/OFF and in my case, 30 seconds. Changing the default has by non-scientific observation impacted battery life and is the default from the manufacturer.

My problem is how do I align to this? I’ve tried dozens of methods to work around this (and with it) such as parallel, queued and restart mode for my automations but every once in a while, I hit that 30 second gap where the automation won’t fire because it’s still in a non-matching state and as a result, lights won’t come on after a separate automation which waits for OFF state turns them off.

IE: I enter a room, PIR picks me up, makes several OR checks (lux,elevation,below_horizon) and then turns on the lights if it should. 30 seconds later, another automation sees the OFF state for 5 seconds and turns off the lights.

The 5 seconds is new but it makes no difference if it waits or not and was added to accommodate people moving around in the room and not having the lights turned off while they’re there.

This really bugs me. Can someone see the tree through the forest for me here?

- id: lights_auto_mudroom_on
  alias: Lights Auto Mudroom On
  trigger:
    - platform: state
      entity_id: binary_sensor.mudroom_pir_motion
      to: "on"
  mode: restart
  condition:
    - condition: or
      conditions:
        - condition: template
          value_template: "{{ (state_attr('sun.sun','elevation')|int) <= 0 }}"
        - condition: template
          value_template: "{{ (states('sensor.mudroom_pir_lux')|int) <= 12.5 }}"
        - condition: template
          value_template: "{{ (states('sun.sun') == 'below_horizon') }}"
    - condition: and
      conditions:
      - condition: state
        entity_id: binary_sensor.mudroom_dw_open # door is not open, light would come on if it was
        state: "off"
      - condition: state
        entity_id: light.mudroom # room light group is off
        state: "off"
      - condition: state
        entity_id: light.mudroom_door # light above door is off
        state: "off"
  action:
    - service: scene.turn_on
      data_template:
        entity_id: >
          {% if now().hour >= 21 or now().hour <= 7 %}
            scene.mudroom_nightlight
          {% else %}
            scene.mudroom_bright
          {% endif %}
- id: lights_auto_mudroom_off
  alias: Lights Auto Mudroom Off
  trigger:
    - platform: state
      entity_id: binary_sensor.mudroom_pir_motion
      to: "off"
      for: "00:00:05"
  condition:
    condition: or
    conditions:
      - condition: state
        entity_id: light.mudroom # room light group is on
        state: "on"
      - condition: state
        entity_id: light.mudroom_door # light above door is on
        state: "on"
  action:
    - service: light.turn_off
      entity_id:
        - light.mudroom_window
        - light.mudroom_door
        - light.mudroom

I should note that normally I only have the light above the door turn on, not both lights in the room. They’re HUE lights and I have the second one installed mostly as a relay in physical space of my layout of the house which as a side-note is unfortunate because I have several like this used pretty much in the same vein as a Z-Wave extender which I also use.

In all cases of the described gap, both lights are off and entering the room the lights don’t turn on. I initially was basing it on Lux only to discover that the Z-Wave update is 90 seconds so next best metric was the sun thus the mighty OR condition.

Really thought I had this licked for sure this time.

Many thanks in advance!

1 post - 1 participant

Read full topic

Withings Integration without External IP

$
0
0

My goal is to integrate Withings (weight, health app) into my HA without webhooks.

The front end error received when trying to integrate is:
No URL available. For information about this error, check the help section

configurations.yaml:

withings:
  client_id: my actual client id here
  client_secret: my actual secret here

Other possibly relevant configurations:
Home Assistant OS 7.0
HA core 2021.12.7
Local IP is static on a /16 subnet

# No external_url is set. I do not want to open ports, etc
internal_url: "http://172.16.10.64:8123"

Values for home assistant on the Withings partner app (their website):

    Logo: requirements met with 300x300 image
    Description: Personal app for collecting my data.
    Contact Email: my actual email here
    Callback Uri: https://YOUR_NABU_CASA_ID.ui.nabu.casa/auth/external/callback.
       #This is exactly how I have it entered. I do not have or want a Nabu Casa id
    Company: Home Assistant

I realize the callback uri is wrong but what would i enter if dont use Nabu Casa or duck dns nor do I have a desire to open ports on my router.

Is this possible without these web hooks and keep things local? If so I am looking for a user friendly approach as I am not a developer.

Assume I am new to all of this and thanks for any help.

1 post - 1 participant

Read full topic

Google calendar setup - with Nginx Proxy Manager?

Google Calendar setup error

$
0
0

Adding my google calendars to another HA system, I already have them working on one system…

Get this error in Notification and no errors I can see in log. Any suggestions?

Error: Invalid response 401. Error: invalid_client
You will need to restart hass after fixing.

1 post - 1 participant

Read full topic

Dashboard Auto Entity Card Code

$
0
0

Hi all, is there any chance someone can help me here. Im using the Auto Entries lovelace front end and im trying to create a card that shows all my battery device levels.

Below is what i have? If i can get this, i shoudl help me understand how i can do others?

Thanks

type: custom:auto-entities
card:
type: entities
title: Battery Level
filter:
include:
- name: Battery Level
exclude: []
sort:
method: none

1 post - 1 participant

Read full topic

Force set a device's state without necessarily performing the action

$
0
0

Hello,

I have a https://bondhome.io/ which I use to control my old ceiling fans via Home Assistant, which works very well. The issue is that if you control the fan outside of the HomeAssistant environment, HomeAssistant’s device state gets out of sync.

I know the best solution is 2 different switches, but I have an old house and do not want to spend the $$$ to rewire the house in this way.

So I have started on a blueprint where I am trying to set the stat of my Ceiling Fan’s Light to “off” if an illuminance sensor reports a set low value, and sets it to “on” if an illuminance sensor reports a high value. In an attempt to try to keep things in sync.

Here is a gist I have started, but know is not functional. I do not know how to make this entity have a state without forcing it to actually perform the action associated with that state. I also am not sure if I can do both the “on” and “off” with one blueprint (trigger 2 different conditions based on device’s value)

1 post - 1 participant

Read full topic

Zigbee2MQTT Dashboard default temperature

$
0
0

I’m sure the answer is right in front of me, but I’ve searched all the settings and can’t figure out how to change the temperature display on the Zigbee2MQTT dashboard view from Celsius to Fahrenheit? Can someone point me in the right direction?

1 post - 1 participant

Read full topic


Triggering an event based on fan device speed

$
0
0

I have some ceiling fans that are only controlled by remote controls so I installed a bond bridge to control the fans. I also installed Z-Wave fan speed switches that I can also see in Home Assistant. Since the fans do not respond to a normal in-wall speed switch the output of the switch isn’t connected to the fan but the switch is intended a physical device to trigger events in Home Assistant. I know how to control the fan using the HA and the Bond Bridge, but I cannot figure out how to trigger an automation when the fan switch changes from off to a specific speed value (low, medium, high). The only trigger I see is on/off. What do I trigger on to catch off to low, low to medium, etc?

Thanks!

1 post - 1 participant

Read full topic

Ambient Weather Units Mixed

$
0
0

I’ve just got a new Ambient weather station, and set up the integration, but the units it pulls are a weird mixture of imperial and metric. Anyone have any insight?

2 posts - 2 participants

Read full topic

Nabu Casa to sponsor Home Assistant voice assistants

$
0
0

Every so often somebody asks for recommendation of best voice Assistant for HA.

Looking in the Analytics I was disappointed to see that the vast majority of installed voice assistants are still cloud based. I understand the superior processing power of the industry behemoths, and the manufacturing scale to get the price of satellite hardware down … But isn’t HA about providing an alternative to corporate cloud processing ?

 Google Cast        40.6%
 Google Assistant   20.2%
 Apple Homekit      17.1%
 Amazon Alexa        8.9%
 Almond              1.3%

A year ago when I started my own voice assistant journey I was very impressed by the Almond demo and HA’s statement that Almond will be the official HA voice assistant. In the mean-time Sanford have published another fancy demo (Genie) which use customised hardware, but otherwise very little has changed. Apparently each Genie satellite requires on its own full Home Assistant. Given the huge proportion of users who want voice control, this doesn’t seem very practical. Can HA / Nabu Casa sponsor someone to work on voice assistant for HA ? And when Genie matures it can be integrated.

And then I found Rhasspy. I now have HA OS, MQTT and Rhasspy add-on running on my Base station (RasPi 4 4MB). More importantly I have 3 satellite systems throughout the house:

  • satellite 1 is a RasPi 3A+ with reSpeaker 4 HAT
  • satellite 2 is a RasPi zero W with reSpeaker 2-mic HAT
  • satellite 3 is a RasPi 3B with USB microphone and USB speakers

All satellites provide microphone, wake-word detection, and speaker services; with Speech-to-text, Intent recognition, and Text-to-Speech done by Rhasspy on the Base station. Sure it’s not Google quality, but it is available now, runs locally, on low cost hardware, and is all open source. The AI modules can easily be swapped to a more powerful processor. Michael has merged the best of snips functionality, and other projects. Have a look at all the modules currently available for Rhasspy.

In Decmber Michael Hansen (Synesthesiam - chief developer of Rhasspy) was lured away to work on Mycroft.AI
The Future of Rhasspy, with the intention to bring both these open source projects more together.
I would recommend that, when it becomes practical, Nabu Casa approach Michael and offer him a job.

1 post - 1 participant

Read full topic

Lights turning on for unknown reason

$
0
0

Multiple lights around my house turn on all at the same instant, multiple times a day, and last night they did it at 10 pm - 11 pm, wife NOT happy. Some of these lights do not have any automation or script to turn them on (only off) so I can’t figure out what is happening.
EG logbook:

The logbook doesn’t help me very much, I don’t know where to go from that minimal info.

I thought it might be the adaptive lighting integration, so disabled that, still happens, the only thing I can say is that it does seems to be HA related, as it never happens when I shut down HA.

Edit: All lights are tuya based, setup via local Tuya, I do have the new official Tuya integration setup as well so I can access scenes and such from it. There are no automations within Tuya to turn on those lights either.
Thanks for any help.

1 post - 1 participant

Read full topic

How restore Shelly 1PM history energy measurement after power loss

$
0
0

Hello, please how you handle the situation, when house lost power, Shelly 1PM loose energy measurement history and start from zero?
All my graphs and calculations for given sensor are nonsense. :frowning:

Thank you.

1 post - 1 participant

Read full topic

Viewing all 105757 articles
Browse latest View live


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