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

Number helper with decimals

$
0
0

As mentioned in another thread I have kep my old HA running with some old versions till I decided to finally upgrade hardware then did an update of OS etc. In doing so i found a lot has changed and decided to start from scratch.

On my olf Lovelace I used to have a slider that showed one decimal place for a tempreture set point. It would have been configured in YAML

So trying to keep things kleen this time I found the helper UI and creaed a helper number BUT cant get it to use 0.1 as in 21.5 or 23.1. It does whole numbers.

So do I have to make those in the config file to achieve that? ALso whilst on that, I also created a couple of toggle helpers. How do you set the restore state etc?

1 post - 1 participant

Read full topic


HA not updating mqtt fast enough

$
0
0

i have a smart plug with energy monitor. it has been flashed with Tasmota and working fine.
what i noticed is that data for power takes a very long time to update in HA. here’s a screenshot:

at least ON/OFF status works. but HA takes at least 5 minutes to update to real time status of the plug.
is there any way to speed this up?

this is my yaml in config file.

sensor:
  - platform: mqtt
    name: "refrigerator Energy Today"
    state_topic: "tele/top2/SENSOR"
    value_template: '{{ value_json["ENERGY"]["Today"] }}'
    unit_of_measurement: "kWh"
  - platform: mqtt
    name: "refrigerator Power"
    state_topic: "tele/top2/SENSOR"
    value_template: '{{ value_json["ENERGY"]["Power"] }}'
    unit_of_measurement: "W"
  - platform: mqtt
    name: "refrigerator Voltage"
    state_topic: "tele/top2/SENSOR"
    value_template: '{{ value_json["ENERGY"]["Voltage"] }}'
    unit_of_measurement: "V"
  - platform: mqtt
    name: "refrigerator Current"
    state_topic: "tele/top2/SENSOR"
    value_template: '{{ value_json["ENERGY"]["Current"] }}'
    unit_of_measurement: "A"

1 post - 1 participant

Read full topic

Dont look for motion, if humidity is high

$
0
0

Hello.
First post, so if I am doing something wrong according to the rules, just let me know.

I am trying to automate the lights on our bathroom. Right now it is just a motion sensor. And thats fine. Untill you shower. Then it cant see you, and after 10 min it turns of the light. (Got teenagers in the house, so +10 min bath is a thing :sweat_smile:).
I have bought a temp+hum sensor. The idea is, that the motion sensor should not work (pause) if the humidity in the room is above, lets say 65%.

My yaml are as follow:

alias: Lys på toilettet via sensor og fugtmåling
description: ''
trigger:
  - type: motion
    platform: device
    device_id: c596df1b9e60693cc64eb5f970f9dedc
    entity_id: binary_sensor.0x00158d0007759e46_occupancy
    domain: binary_sensor
condition: []
action:
  - service: light.turn_on
    data: {}
    target:
      entity_id:
        - light.gruppe_toilet_lys
  - wait_for_trigger:
      - type: no_motion
        platform: device
        device_id: c596df1b9e60693cc64eb5f970f9dedc
        entity_id: binary_sensor.0x00158d0007759e46_occupancy
        domain: binary_sensor
        for:
          hours: 0
          minutes: 10
          seconds: 0
  - service: light.turn_off
    data: {}
    target:
      entity_id:
        - light.gruppe_toilet_lys
mode: restart

How do I set that condition right? The motion sensor has to be activ any other time, when no 1 is in the shower.

1 post - 1 participant

Read full topic

Need help for "This entity does not have a unique ID"

$
0
0

Ill appreciate very much some guide or help creating a unique ID through MQTT or YAML
I’ve looked for instruction, but couldn’t find anything I can understand
I’m trying to make one for my media player Bluesound (=media_player.bluesound_ww)
another one for motion sensor with app IPwebcam (=switch.working_ip_motion_detection)
and one for current temperature from ac connected to HA with ST
again I’ll be great full for good instruction as I am really confused

3 posts - 2 participants

Read full topic

Log error - can't fix help please

$
0
0

Hi
I get this message:
Invalid config for [automation]: required key not provided @ data[‘action’][0][‘domain’]. Got None. (See /config/configuration.yaml, line 57).
2:38:27 PM – (ERROR) config.py - message first occurred at July 30, 2022 at 11:31:03 PM and shows up 17 times
in lines 57-59, I’ve got this:


# Text to speech (57)
tts: (58)
  - platform: google_translate (59)

how do I fix it?

3 posts - 2 participants

Read full topic

I can't see the MQTT data in home Assistant

$
0
0

Hello everyone
I do not know what I’m doing wrong.
Sensor created and data is not seen.


looks like an entity

Node red data
Node_red
Config node
Node_Config
Connection with mosquitto brocker is OK
MQTT Explorer
Lines in configuration.yaml file

mqtt:
  sensor:
    - name: "Watios_RST"
      unique_id: energiacasa
      state_topic: "/nuc"
      unit_of_measurement: "W"
      value_template: "{{ value_json.wtotal }}"

1 post - 1 participant

Read full topic

Assembling three (or four) automations into one?

$
0
0

After tinkering a room light sequence to the point it’s perfect, I ended up with 4 automations. Three of them turn on the light, and the last one turns them off.

The tricky thing for me here is that the three first automations have different ‘or’ conditions stacked on the ‘and’ conditions. I have a hard time combining these different ‘or’ conditions to simply create one automation that sets the right. I also don’t know if it is even possible, but why not ask: Most of my automations suffer this kind of problem, with some help I could learn a thing or two.

First three automations to set the right lights

- alias: Logeerkamer_Occupancy_Lights_on_While_music_plays
  description: 'Logeerkamer verlichting op basis van occupancy and slaapkamermuziek'
  mode: restart
  max_exceeded: silent
  trigger:
    - entity_id: binary_sensor.logeerkamer_pir_occupancy
      platform: state
      to: 'on'
  condition:
    - condition: state
      entity_id: input_boolean.alarm_triggered      # ON state means no one has gone to bed that day yet
      state: 'on'
  action:
    service: light.turn_on
    entity_id: light.logeerkamerverlichting


- alias: Logeerkamer_Occupancy_Lights_day_on
  id: '00000002098246'
  description: 'Logeerkamerverlichting overdag op basis van motion en occupancy'
  mode: restart
  max_exceeded: silent
  trigger:
    - entity_id: binary_sensor.logeerkamer_pir_occupancy
      platform: state
      to: 'on'
  condition:
    - condition: state
      entity_id: light.shelly1_68a0b8
      state: 'off'
    - condition: state
      entity_id: input_boolean.first_time_to_bed     # ON state means no one has gone to bed that day yet
      state: 'on'
    - condition: or
      conditions:
      - condition: sun
        after: sunset
        after_offset: "-00:30:00"
      - condition: numeric_state
        entity_id:
          - sensor.average_pir_voordeur
        below: 1000                                  # Adjust for daylight correction front door. Lower value = lights go on later
      - condition: state
        entity_id: switch.gordijnen_logeerkamer
        state: 'off'
  action:
    - service: light.turn_on
      entity_id: light.logeerkamerverlichting


- alias: Logeerkamer_Occupancy_Lights_night_on
  id: '000000020982234546'
  description: 'Logeerkamerverlichting nacht op basis van motion, occupancy en first time to bed'
  mode: restart
  max_exceeded: silent
  trigger:
    - entity_id: binary_sensor.logeerkamer_pir_occupancy
      platform: state
      to: 'on'
  condition:
    - condition: state
      entity_id: light.shelly1_68a0b8
      state: 'off'
    - condition: or
      conditions:
      - condition: state
        entity_id: input_boolean.first_time_to_bed      # ON state means no one has gone to bed that day yet
        state: 'on'
      - condition: state
        entity_id: light.nachtlampje                    # ON state means the bedlights are on (someone is probably reading)
        state: 'on'
  action:
    - service: light.turn_on
      entity_id: light.logeerkamerverlichting



- alias: Logeerkamer small light on during night if someone is in bed
  id: 'Nachtlampje logeerkamer'
  description: 'Logeerkamerverlichting snachts op basis van motion en bed occupancy'
  mode: restart
  max_exceeded: silent
  trigger:
    - entity_id: binary_sensor.logeerkamer_pir_occupancy
      platform: state
      to: 'on'
  condition:
    - condition: state
      entity_id: light.shelly1_68a0b8
      state: 'off'
    - condition: or
      conditions:
      - condition: state
        entity_id: input_boolean.first_time_to_bed      # OFF state means someone is in bed
        state: 'off'
      - condition: state
        entity_id: light.nachtlampje                    # OFF state means the bedlights are off (no one is reading) 
        state: 'on'
  action:
    - service: light.turn_on
      entity_id: light.iris
      data:
        brightness: 50
        rgb_color:
          - 255
          - 205
          - 81

And to turn them off:

# Lichten uit na occupancy timer of lichten aan timer is afgelopen
- alias: timer_logeerkamer_done
  mode: single
  max_exceeded: silent
  trigger:
  - entity_id: binary_sensor.logeerkamer_pir_occupancy
    platform: state
    to: 'off'
    for: '00:20:00'
  - entity_id: light.iris
    platform: state
    to: 'on'
    for: '00:40:00'
  - entity_id: light.shelly1_68a0b8
    platform: state
    to: 'on'
    for: '00:40:00'
  condition:
      - condition: state
        entity_id: binary_sensor.logeerkamer_pir_occupancy
        state: 'off'
  action:
    - service: light.turn_off
      data:
        entity_id:
        - light.iris
    - service: light.turn_off
      data:
        entity_id:
        - light.shelly1_68a0b8

1 post - 1 participant

Read full topic

Grafana - unable to add my first data source?

$
0
0

As a “clean start”, I have installed HomeAssistant as a VirtualBox client. Then InfluxDB and finally Grafana.
I think InfluxDB is reading/storing my ESPHome sensor correctly because I can use the InfluxDB “Explore” to view it. However, I seem to have trouble getting the Add Data Source to complete. When I select “Save & Test” it reports “Invalid URL”. I note from various tutorials that the URL may be “http://a0d7b954-influxdb:8086” but I can not edit the Garfana URL field?
image

I note somewhere, that only a Grafana Admin can create a Data Source. Is this a likely reason?

Regards, M.

1 post - 1 participant

Read full topic


Has the service group.set been removed?

$
0
0

I use to have an automation that created a group based on a search criteria.
Everything was working great but i moved house and decided it would be best for a fresh install but this is now failing and I get an error that HA can’t called the service group.set

- id: "1641380832863"
  alias: Update Energy Groups
  description: ""
  trigger:
    - platform: homeassistant
      event: start
    - platform: event
      event_type: call service
      event_data:
        domain: group
        service: reload
  condition: []
  action:
    - service: group.set
      data:
        name: Living Room Energy
        object_id: living_room_energy
        entities: "{{ states.sensor | selectattr('object_id', 'search', '^(livingroom|entertainment)') | selectattr('object_id', 'search', '(_energy)$') | map(attribute='entity_id') | list }}"

Error while executing automation automation.update_energy_groups: Unable to find service group.set

thanks for any info

1 post - 1 participant

Read full topic

What is the esiest way to get subsets of an attributte from a sensor split out into new entities?

$
0
0

I am trying to get wind speed forecast data from Open Meteo, that are attributes under the forecast key. But that key is a list of dictionaries with seven different key:val pairs. I am only interested in one value from each index on the list (see “attributes” below).

I have been looking at the “attributes” in entities card, but I can only get the list. It doesn’t seem like I can index the nested list and dictionary.

I’ve tried this:

type: entities
entities:
  - type: attribute
    entity: weather.open_meteo
    attribute: forecast
    name: Forecacst

but that gives the entire list of dictionaries. And indexing with . o square brackets [] doesn’t seem to work.

I have also looked at the config-template-card, but I know zero Javascript, so I didn’t get that far with that one. And started wondering if there was not a simpler way?

"attributes" for the weather.open_meteo entity. I want each "wind_speed" value (click for more details)

1 post - 1 participant

Read full topic

BYD battery and Home Assistant

$
0
0

I haven’t found an integration for a BYD battery yet. Has anyone been able to make this for themselves or how do you get started and what do you need from BYD for this?

1 post - 1 participant

Read full topic

How to deal with transitions and non-dimmable devices?

$
0
0

I’m using transitions when applying scenes. In my living room i mostly use devices which are dimmable. I have one lightbulb which doesnt, and simply turns off or off.

When i apply a smooth 5 second transition for turning the lights off, this 1 lightbulb turns off immediately while the dimmable devices start their transition… This annoys me, what i would like is that this device turns off after the devices that do support transitions reach 0% brightness.

How to deal with this, other than scene.turn_on for the dimmable devices and afterwards light.turn_on for the nondimmable bulb?

2 posts - 2 participants

Read full topic

I only want to record sensor values when another item is switched on

$
0
0

Hi

I’ve looked around for answers but I don’t think I have found a savvy way to achieve the following.

I only want to record temperature values from a probe when another device (a pump) is switched on.

I have a temperature probe which reliably records to HA. I also have the pump status (running/not running) via toggle/switch. The thing is that it is reporting the temperature of water in my pool by placing the probe within the pipes near my pump. When the pump is running, this is a good representation of the pool temperature, but in the evening the water in the narrow pipe drops significantly. This make it SEEM like the pool cooled off a lot during the night when in fact it did not.

I think I would like to only record the temperature when the pump is running, and ignore it otherwise.

Happy to use NodeRed, but would love for this to be config based.

2 posts - 2 participants

Read full topic

Add default value to json based template sensor

$
0
0

I have the following json template.

# Balcony Door Sensor battery level

  - name: 'Balcony Door Sensor Battery'

    state_topic: 'helium/8ac291e5-540a-4b12-8785-eef0dc72ebdb/rx'

    value_template: "{{ value_json.battery if value_json.battery is defined else states('sensor.balcony_door_sensor_battery') | round(1) }}"

    unit_of_measurement: "%"

    device_class: "battery"

But home assistant complains that sensor.balcony_door_sensor.battery' doesnt have a default value, and I’m not quite sure how to add one.

1 post - 1 participant

Read full topic

How can I disable the current automation in a blueprint?

$
0
0

I have a blueprint configured that I use for motion lights in many rooms in my house. I’d like to configure the blueprint so that if anyone of the sensors or lights for the automation go offline, it turns off the automation (and sends me a notification). Is there a way to do this without having to create a variable for the user to choose the automation after the create it from the blueprint? Is there a concept of “self”?

1 post - 1 participant

Read full topic


Automate a smart plug to Turn on/off camera within time period

$
0
0

Hey guys, i just got Home assistant setup, the main reason i got it is just to get this automation to work. i appreciate if someone can help me with that.

I have a smart plug (zigbee) that connected to a camera, The automation i want is as follow:

  1. the camera switch is ON , from 7.45 am to 10.15 pm, OFF at other time
  2. If im not home i want the camera switch to be ON all time, and disregard the rule 1)
  3. if i come home , i want it to get back to rule 1)

i spent two days trying to get HA working and now i dont know the trigger , conditions, actions, or state logic to do this . Appreciate it.

1 post - 1 participant

Read full topic

Picture Glance frustrations – How do you enable features without changing behavior?

$
0
0

My goal: To have a Picture Glance card that displays the camera from my 3D printer such that it is grayscale when not printing and in color while printing.

This was simple enough to achieve with the following:

      - type: picture-glance
        entities:
          - entity: camera.octoprint_cam
        camera_image: camera.octoprint_cam
        camera_view: live
        state_filter:
          "on": saturate(1)
          "off": saturate(0)
        entity: binary_sensor.octoprint_printing

however, when I set the entity to be the binary_sensor, tapping on the card now shows the status of that sensor, whereas before adding the state_filter tapping on the card would pop-up the camera feed, i.e.

      - type: picture-glance
        entities: []
        camera_image: camera.octoprint_cam
        camera_view: live

My question: Is there any way to configure this so that I can have the grayscale applied, while also being able to tap the card to show the camera feed?

I have tried variants of tap_action and had no success, and currently have it so tapping the camera icon associated with the glance entity opens the feed, but would really prefer the entire card being tappable so hoping someone more experienced here could advise. Thanks.

1 post - 1 participant

Read full topic

Control Zigbee Lights with KNX switch

$
0
0

Hi, I am trying to switch Zigbee Lights from my KNX switches. But when I press a button, nothing happens. This is the first time I am trying to create an automation with a self-created blueprint.
I believe I am missing something, what could it be?

Automation Blueprint:

blueprint:
  name: KNX2Zigbee Automation
  description: "KNX Befehle auf Zigbee übertragen (Licht)"
  domain: automation
  input:
    switch:
      name: KNX Objekt
      description: Kommunikationsobjekt (5/1/...)
      selector:
        entity:
          domain: switch
    light_1:
      name: Tastendruck
      description: Welche Zigbee Leuchte soll kontrolliert werden?
      selector:
        target:
          entity:
            domain: light
#            mode: restart
max_exceeded: silent
trigger:
  - platform: state
    entity_id: !input "switch"
    attribute: action
action:
  - variables:
      command: "{{ trigger.to_state.state }}"
  - choose:
      - conditions:
          - "{{ command == 'off' }}"
        sequence:
          - service: light.turn_off
            target: !input "light_1"
            data: {}
      - conditions:
          - "{{ command == 'on' }}"
        sequence:
          - service: light.turn_on
            data: {}
            target: !input "light_1"

KNX Device:

knx:
  switch:
      - name: "Flur EG Licht Garderobe ZB"
      address: "5/1/0"
      state_address: "5/1/0"

1 post - 1 participant

Read full topic

Bulk statistics adjustment

$
0
0

I see that it is now possible, via:

Dev > Statistics

To adjust individual erroneous stats.

I have some sensors that have been running for some years, and sporadically given a stats value that is a real outlier - so for instance 50000 when a normal value would be 5

Other than manually finding and correcting each one, is there a method to do a bulk fix for a sensor over all time - along the lines of “Set value = 0 where value > 50000” ?

1 post - 1 participant

Read full topic

Nest cameras quit after a day or two

$
0
0

I am having a problem with my Nest integration. I deleted everything and started fresh when we had to change the authentication method. I have 4 doorbell cameras and 2 thermostats. Everything works fine (after a lot of frustration and YouTube videos). The cameras show a picture on my dashboard, and the thermostats work great.

The problem I am having is that after a day or so the cameras start to drop out. I just get a grey box instead of a picture. Most of the time I can just reload the nest integration and they all come back up. But every so often I have to restart HA completely. I never loose control of the thermostats.

Below is a copy of a log from one of the cameras.

Logger: homeassistant.components.stream.stream.camera.barn
Source: components/stream/init.py:416
Integration: Stream (documentation, issues)
First occurred: July 29, 2022 at 3:44:25 PM (232 occurrences)
Last logged: 1:50:32 PM

Error from stream worker: Error opening stream (HTTP_FORBIDDEN, Server returned 403 Forbidden (access denied)) rtsps://stream-uc2-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxr6PoHWl2qpF8s4W7PpmfpVGVEhfEGh8Yu_LLS0-dguE8EnAAmMEfeem6wG_VmHu13gg3f7uyUBq7dyuHmp5_S6j5_fgSEJmlEHiu2gldD6QzqK61_wAJTaCtmFReRv2X0pTlGBAr_RdJWAxoDQIXT1R-zEWqfCplbg96-gRUpyOUhustI0jdgp7CTXl0Dg8lH0uU?auth=****
Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://stream-uc2-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxr908B8ZwRlB2Waw50V9jBltzW_kzo9a2Bk3W-eEWgo-MEnEAmMEfeYmQrMdfCJCLvpViEAHkToJpXHa7xz9JDg-gJrhlcCJ1TG30SCfqaNMwbwJ7FdEZgT99QDRnBOU_I5E5LyjqsKl25cLaQN7ZsZAc7e54qtqbM3Lc2mAGKsGRjVEFthL46_r4QeEdz9pSs3Km1Q?auth=****
Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsps://stream-uc2-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxr9YdQZ-p_x4cQEywUUIFj-nei9M0l0sM_GbU1gBUNcyxEnEAmMEfecgoUUaMGyAqqT5ZLf-qzh0QAvMUOZctqQwSt-eSTY3XTJtJuOTsfPuZg15Qf0og3jUfoP_QgPJ8cwbOS3tm2gXidwVzlCWOjqQCErfESE0Z6bNnJyAg-de73qv66nKpnArhp9XGBPRjLvMyBw?auth=****
Error from stream worker: Error opening stream (INVALIDDATA, Invalid data found when processing input) rtsps://stream-uc2-delta.dropcam.com:443/sdm_live_stream/CiUA2vuxr908B8ZwRlB2Waw50V9jBltzW_kzo9a2Bk3W-eEWgo-MEnEAmMEfeYmQrMdfCJCLvpViEAHkToJpXHa7xz9JDg-gJrhlcCJ1TG30SCfqaNMwbwJ7FdEZgT99QDRnBOU_I5E5LyjqsKl25cLaQN7ZsZAc7e54qtqbM3Lc2mAGKsGRjVEFthL46_r4QeEdz9pSs3Km1Q?auth=****
Error from stream worker: Stream has no video

1 post - 1 participant

Read full topic

Viewing all 109085 articles
Browse latest View live


Latest Images

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