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

Hue Motion Sensor

$
0
0

@duckettp wrote:

Im trying to set up an automation that triggers on Motion in my kitchen if i ever need a Midnight Lemonade Drinker.

I have it set up like so:

  • Motion
  • Sun below horizon
  • After 10pm
  • Both Lights are off
    Activate: Light Scene (Red Slow Fade up)

This works All works

But i would like to turn them off (Fade out) after 30 seconds after last motion.
I did set up another automation to do this but and here is my problem.

I haven’t found away to connect the automations so i get some scenerios if im up late with the lights on then all of a sudden the light turn off as it has not detected motion.

Anyone got any ideas of how to only turn them off after motion if they where activated by motion?

Posts: 1

Participants: 1

Read full topic


Show state of sensor only if it is a problem?

$
0
0

@Matt_Barnes wrote:

I have a plant sensor configured showing me temp and moisture etc.

It creates a “problem” state if any of the measurements fall above or below the min/max set.

This looks like the below:

image

I created a template sensor of the problem (not sure if that was needed)

  - platform: template
    sensors:
      pothos_marble_state:
        friendly_name: "Pothos"
        value_template: "{{ state_attr('plant.pothos_marble', 'problem') }}"

and that works too.

Now I was hoping to have some sort of entity filter card but for this problem so that the text appears above or below the plant details in my plant card (or potentially on a front page in HA…)

image

Is there a way of showing a state only if there is something in it? I am amazed I managed the template sensor but have fully run out of skill now.

Posts: 1

Participants: 1

Read full topic

Hassio automation (triggered but did nothing)

$
0
0

@Joshi wrote:

I need some assistance if possible, I have a dual garage door opener (ESP32) with magnetic door position switches to open my garage. If I open with Hassio or with my remote the door will stay open for 2 minutes then an automation will trigger to close a relay connected to the door motor push button interface. after 15 minutes it will additionally trigger a sms to my mobile to say door is open. This has worker perfect for 2 months. today I forgot the door open, the automation to close the door was triggered but the door did not close, after 15 minutes the other automation triggered and I got the sms.
in the logbook I can see the automation to close the door was triggered but yet the door stayed open.
nowhere can I see what the cause was.

my esp32 connects to my wifi network via a ubiquiti AP, that AP stated the device has been connected for 4 days so it does not seem the esp32 lost wifi connection.

where and how can I trouble shoot this as my garage door was open for over an hour with valuables in.

Posts: 1

Participants: 1

Read full topic

MQTT Light problems

$
0
0

@poudenes wrote:

Hi ALl,

Can someone tell me why this happen:

2020-05-13 18:04:37 ERROR (MainThread) [homeassistant.util.logging] Exception in state_received when handling msg on 'milight/states/0xAAAF/rgb_cct/0': '{"brightness":3,"level":1,"color":{"r":255,"g":255,"b":255},"device_id":43695,"group_id":0,"device_type":"rgb_cct"}'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 35, in wrapper
    msg_callback(msg)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/light/schema_json.py", line 243, in state_received
    if values["state"] == "ON":
KeyError: 'state'

2020-05-13 18:04:37 ERROR (MainThread) [homeassistant.util.logging] Exception in state_received when handling msg on 'milight/states/0xAAAF/rgb_cct/1': '{"brightness":3,"level":1,"color":{"r":255,"g":255,"b":255},"device_id":43695,"group_id":0,"device_type":"rgb_cct"}'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 35, in wrapper
    msg_callback(msg)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/light/schema_json.py", line 243, in state_received
    if values["state"] == "ON":
KeyError: 'state'

2020-05-13 18:04:37 ERROR (MainThread) [homeassistant.util.logging] Exception in state_received when handling msg on 'milight/states/0xAAAF/rgb_cct/2': '{"brightness":3,"level":1,"color":{"r":255,"g":255,"b":255},"device_id":43695,"group_id":0,"device_type":"rgb_cct"}'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 35, in wrapper
    msg_callback(msg)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/light/schema_json.py", line 243, in state_received
    if values["state"] == "ON":
KeyError: 'state'

2020-05-13 18:04:37 ERROR (MainThread) [homeassistant.util.logging] Exception in state_received when handling msg on 'milight/states/0xAAAF/rgb_cct/3': '{"brightness":3,"level":1,"color":{"r":255,"g":255,"b":255},"device_id":43695,"group_id":0,"device_type":"rgb_cct"}'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 35, in wrapper
    msg_callback(msg)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/light/schema_json.py", line 243, in state_received
    if values["state"] == "ON":
KeyError: 'state'

2020-05-13 18:04:38 ERROR (MainThread) [homeassistant.util.logging] Exception in state_received when handling msg on 'milight/states/0xAAAF/rgb_cct/0': '{"brightness":0,"level":0,"color":{"r":255,"g":255,"b":255},"device_id":43695,"group_id":0,"device_type":"rgb_cct"}'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 35, in wrapper
    msg_callback(msg)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/light/schema_json.py", line 243, in state_received
    if values["state"] == "ON":
KeyError: 'state'

2020-05-13 18:04:38 ERROR (MainThread) [homeassistant.util.logging] Exception in state_received when handling msg on 'milight/states/0xAAAF/rgb_cct/1': '{"brightness":0,"level":0,"color":{"r":255,"g":255,"b":255},"device_id":43695,"group_id":0,"device_type":"rgb_cct"}'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 35, in wrapper
    msg_callback(msg)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/light/schema_json.py", line 243, in state_received
    if values["state"] == "ON":
KeyError: 'state'

2020-05-13 18:04:39 ERROR (MainThread) [homeassistant.util.logging] Exception in state_received when handling msg on 'milight/states/0xAAAF/rgb_cct/2': '{"brightness":0,"level":0,"color":{"r":255,"g":255,"b":255},"device_id":43695,"group_id":0,"device_type":"rgb_cct"}'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 35, in wrapper
    msg_callback(msg)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/light/schema_json.py", line 243, in state_received
    if values["state"] == "ON":
KeyError: 'state'

2020-05-13 18:04:39 ERROR (MainThread) [homeassistant.util.logging] Exception in state_received when handling msg on 'milight/states/0xAAAF/rgb_cct/3': '{"brightness":0,"level":0,"color":{"r":255,"g":255,"b":255},"device_id":43695,"group_id":0,"device_type":"rgb_cct"}'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 35, in wrapper
    msg_callback(msg)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/light/schema_json.py", line 243, in state_received
    if values["state"] == "ON":
KeyError: 'state'

I tried to restart MQTT Add-On, also the Milight Hub, HA itself. But see this error many times now.

Posts: 6

Participants: 2

Read full topic

Zwave log errors - Something to worry about or just "noise"

$
0
0

@ptdalen wrote:

My zwave network seems to be pretty stable. Rarely have issue. I was looking at my schlage locks today, and doing some testing and noticed that when I set a code, I always end up with an error or two at the end of the sequence

2020-05-13 12:16:36.418 Error, Node104, ERROR: ZW_SEND_DATA could not be delivered to Z-Wave stack

But the code it set just fine, it all seems to be working just fine.

So I looked and see that I have this error on a few of my nodes throughout the day. It seems to be mostly battery powered items, but a few wall switches as well.

It is consistent with my locks when I set a code, but still not sure if I should even care. Might just be an unsupported request? Anyway, is this something that other people see in thier logs as well.

Posts: 2

Participants: 2

Read full topic

Zwave2mqtt - Honeywell Dimmer 39458

$
0
0

@jasin81 wrote:

I’m trying to get a this ZWave dimmer working with zwave2mqtt without much success. https://products.z-wavealliance.org/products/3751?selectedFrequencyId=2

I have it discovered, publishing, etc but I’ve tried about every template to get it working consistently. Basically, I’m struggling to even get it to work as a basic switch (no dimming) because the values are all over the place. Here’s what i have:

  - platform: mqtt
    name: "Office Test Light"
    state_topic: 'homeassistant/OfficeLight/38/1/0'
    state_value_template: "{% if (value_json.value | int) == 0 %} 0 {% else %} 99 {% endif %}"
    command_topic: 'homeassistant/OfficeLight/38/1/0/set'
    payload_on: 99 
    payload_off: 0

Just trying this as a basic switch, no dimming. Here’s where it gets interesting. If I turn the switch on, it turns on, no issues and HA shows it’s on. If I turn it off, the light turns off but the value changes to like 97 or 94, sometimes 96 (watching in MQTT explorer) so HA thinks the switch is on. I have tried “0”, ‘0’, off, “off”, false, etc doesn’t matter. If I send the payload of 0 again, it changes the value to 0 and HA shows the state as off.

Does anyone have any suggestions? At this point, I’d be happy just to get a simple on/off switch working with HA showing the proper states. Otherwise, I may just have to re-link it with Smarrtthings.

Thanks!

Posts: 1

Participants: 1

Read full topic

Understanding Proximity Integraton

$
0
0

@troyc wrote:

I’m using the proximity integration documented here:
https://www.home-assistant.io/integrations/proximity/

When I only use one device in the tracking list, everything seems to give me correct data. The problem is when I add a second device into the mix like this:

 zone1:
   zone: zone1
   devices:
     - device_tracker.phone1
     - device_tracker.phone2
    tolerance: 50
    unit_of_measurement: mi
 
 zone2:
   zone: zone2
   devices:
     - device_tracker.phone1
     - device_tracker.phone2
   tolerance: 50
   unit_of_measurement: mi

Other info: HA getting location data of the phones from life360 and the data in HA for both phones show the correct coordinates for the phones’ current locations. The zones in question are 10 miles apart.

Using the above configuration and with phone1 physically in zone1 and phone2 physically in zone2, the system correctly says the distance to zone2 is 0 miles, and lists phone2 as the nearest device.
However, the distance to zone1 is incorrectly listed as 10 miles, while phone2 as the nearest device.

I would have expected the zone1 state to have been zero with phone1 as the nearest device. Is there some reason the system is using the wrong device to evaluate against that zone?

Also, the value to the “tolerance” field, is it always meters or does the unit_of_measurement affect the unit of that field?

Posts: 1

Participants: 1

Read full topic

HA not restarting

$
0
0

@Makis wrote:

I tried to restart after a change of a sensor. I checked and the validation was ok.
but at the restart stopped working. below the logs which indicates that something is wrong with my google calendar. Any suggestions what to do?


2020-05-13 21:18:47 INFO (SyncWorker_5) [googleapiclient.discovery] URL being requested: GET https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest

edit: I stopped HA restarted and its online.
I don’t know why this happen though

Posts: 1

Participants: 1

Read full topic


Input_datetime to time condition

$
0
0

@jussip wrote:

I’m trying to use input_datetime as condition but it didn’t work.

- condition: time
          after: "{{ states('input_datetime.mower_timer1_start_time') }}"
          before: "{{ states('input_datetime.mower_timer1_stop_time') }}"
2020-05-13 20:59:54 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Invalid time specified: {{ states('input_datetime.mower_timer1_stop_time') }} for dictionary value @ data['condition'][0]['conditions'][2]['before']. Got None
Invalid time specified: {{states.input_datetime.mower_timer1_start_time.state}} for dictionary value @ data['condition'][0]['conditions'][2]['after']. Got None. (See ?, line ?).

template editor
{{states.input_datetime.mower_timer1_start_time.state}}
returns
08:00:00
this works

- condition: time
          after: "08:00:00"
          before: "15:00:00"

What is wrong?

Posts: 2

Participants: 2

Read full topic

Notifications not functioning correctly

$
0
0

@joe8mofo wrote:

I am trying to trigger actionable notifications for android while passing through the data via data_template but it doesn’t want to work. I am passing data to the script and then calling the script s_alarm_trigger.

s_alarm_trigger:
  sequence:
  - delay:
      seconds: 1    
  - service: notify.mobile_app_josh_s8
    data_template:
      message: "{{ message }}"
    data:
      actions:
        - action: "silence_alarm"
          title: "Disarm Alarm"

Posts: 1

Participants: 1

Read full topic

Automation working for notify, but not for entity_id

$
0
0

@broyuken1 wrote:

I have the following automation set up that SHOULD turn the lights in my kids room green at certain times to let them know that they can come out (either in the morning or from nap time). It hasn’t been working so I set up the notify action as well to see if my template was working fine. The notify action will send me the entity_id I want like it’s supposed to, but the automation is not triggering. If I set the variable to a static entity, it works fine. I’m thinking that the template returns a string, and the script is looking for something else, but I’m not sure what or how to convert it.

Automation:

- id: '1589220886910'
  alias: Kids Light Turns Green
  description: '
  trigger:
  - entity_id: sensor.time
    platform: state
    to: 06:45
  - entity_id: sensor.time
    platform: state
    to: '14:30'
  - entity_id: sensor.time
    platform: state
    to: '15:30'
  - entity_id: sensor.time
    platform: state
    to: '14:26'
  condition: []
  action:
  - data:
      variables:
        entity_id: {{ state_attr( {% if states.sensor.time.state == '06:45' %}'light.charlottes_light,light.justins_light'{%
          elif states.sensor.time.state == '14:30' %}'light.charlottes_light'{%
          elif states.sensor.time.state == '15:30' %}'light.justins_light'{% elif
          states.sensor.time.state == '14:26' %}'light.office_lamp'{% endif %} ) }}
    entity_id: script.1589220206391
    service: script.turn_on
  - data_template:
      data:
        push:
          thread-id: test
      message: '{% if states.sensor.time.state == '06:45' %}'light.charlottes_light,light.justins_light'{%
        elif states.sensor.time.state == '14:30' %}'light.charlottes_light'{%
        elif states.sensor.time.state == '15:30' %}'light.justins_light'{% elif
        states.sensor.time.state == '14:26' %}'light.office_lamp'{% endif %}'
      title: Test
    service: notify.mobile_app_brians_iphone

Script:

'1589220206391':
  alias: Kids Lights Turn Green
  sequence:
  - data_template:
      brightness: 1
      entity_id: '{{ entity_id }}'
    service: light.turn_on
  - data_template:
      color_name: green
      entity_id: '{{ entity_id }}'
    service: light.turn_on

Posts: 1

Participants: 1

Read full topic

National Weather Service (NWS) frequently "unavailable"

$
0
0

@BrianHanifin wrote:

At the suggestion of this topic, I am attempting to switch from Dark Sky to NWS. However, as I work through updating my template sensors, I am noticing my weather.nws is frequently reporting “unavailable”.

I set NWS up via the Integrations page. I provided an Email address and the id of my nearby weather station. It reports the data most of the time.

Is anyone else having problems, or know what I can do to make it reliable.

Posts: 1

Participants: 1

Read full topic

Is there any countdown timer for tasmota plugs in Lovelace

$
0
0

@rgviewer wrote:

I have a few tuya plugs that were flashed with tasmota firmware that I use in home assistant, but the one thing I really miss is having the control that I had in the smart life app that allowed me to shut off the smart plug after x amount of time. Is there any countdown timer that is easy adaptable within home assistant that allows a user to shut off plug after a set time. I can set up an automation that will do it, but would have to change that automation every time I wanted a different time. Looking for something that my wife could easy do within Lovelace.

Posts: 1

Participants: 1

Read full topic

Get color from media_player

$
0
0

@artaxx wrote:

Hi there,

I am working on a honestly a little bit strange thing but it may be some kind of cool.

I am using Volumio as High Res Audio player with the touch screen plugin for output on the tv. I often do sound demos for costumers and always want to show some new cool stuff.

My idea at the moment is to fill the room with color light from the background image of Volumio (as example here a screenshot):

My idea was to hardcode the blues and greens in the wallpaper and only change the middle LED color which represents the cover color (I have four LED spots, one to the front wall, one to the back wall, one to the left, one to the right).

So, as I see does the media_player integration analyzes the cover color out of the box. Do you see any chance to extract that analyed color for further things?

Bildschirmfoto 2020-05-13 um 21.19.58

Thank you very much for your help!

Greets from germany
Daniel

Posts: 1

Participants: 1

Read full topic

Dnsmasq addon cache size config

$
0
0

@vormsty wrote:

Hello,
How to set parameters for dnsmasq add on ?
For example cachesize ?

Many thanks
Thierry

Posts: 1

Participants: 1

Read full topic


Linecolor on core card sensor doesnt error?

$
0
0

@Mariusthvdb wrote:

not aware of this thread: Lovelace sensor graph lin color - 0.84.0

I noticed today, trying to change the color of my sensor line using this config (for ages…)

  - type: sensor
    name: Opbrengst Zonnepanelen
    entity: sensor.zp_actuele_opbrengst
    graph: line
    detail: 2
    height: 75
    line_color: '#3498db'

it doesn’t work. Which reading the above post, should be expected.

It doesn’t throw an error though, isn’t that supposed to be a bug…?

Posts: 1

Participants: 1

Read full topic

Errors Passing Data to Python Script

$
0
0

@cigmole wrote:

I have been going in circles trying to get a basic script working, I must be missing something. I have two input_numbers: one for the volume of the TV and one for a slider to control that volume (i have a dumb TV and a broadlink) the python script takes the two numbers and adjusts the volume to be the same so I can use the slider to adjust the volume on the TV.

here is the automation that calls the script:

   alias: TV Volume Down
  description: ''
  trigger:
  - platform: template
    value_template: '{{(states.input_number.tv_vol_slider.state | int) < (states.input_number.tv_volume.state | int)}}'
  condition: []
  action:
  - data_template:
      slider: '{{ (states.input_number.tv_vol_slider.state | int) }}'
      tv: '{{ (states.input_number.tv_volume.state | int) }}'
    service: python_script.tv_volume

here is the python I am using:

tv_vol  = data.get('tv')
slider_vol  = data.get('slider')
vol_dwn = 'JgDMAHI4Dg8OKw4PDg4PDg4PDg4ODw4ODw4ODw4ODg8OKw4PDg4PDg4ODw4ODw4ODg8ODg8rDg4PDg4ODw4ODw4ODw4ODw4rDw0PDg4PDg4OKxANDg8OKw8NDw4ODw8NDyoQDQ8qEAAJiXM4EA0PKg8ODg4PDg4ODw4ODw4ODw4ODg8ODg8OKw8NDw4ODw4ODw4ODg8ODg8ODg8qEA0ODw4ODw4ODg8ODg8ODg8qDw4ODw4ODw4OKw8ODg4PKg8ODg8ODg8ODisQDQ4rDwANBQAAAAAAAAAAAAAAAA=='
vol_up = 'JgAyAXM4Dw4OKxANDg4PDg4ODw4ODw4ODw4ODw4ODg8OKw4PDg4ODw4ODw4ODg8ODg8ODg8qDw4ODw4ODw4ODw4ODg8ODg8ODg8ODg4PDg4PKg8ODg8ODg8ODg8ODg4PDisODw4rDgAJgXM4Dg4PKw4ODg8ODg8ODg8ODg4PDg4PDg4PDg4OKw4PDg8ODg4PDg4PDg4PDQ8ODw4rDg8ODg8ODRAODg4PDg4ODw4PDg4ODw4ODw4OKw4PDg4PDg4PDg4ODw4ODyoPDg4rDwAJgXI4Dw4OKw4PDg4PDg4PDg4PDg4PDg4ODw4ODg8OKw4PDg4ODw4PDg4ODw4ODw4ODw4rDQ8PDg4PDg4ODw4ODw4ODw4ODg8ODg8ODg8OKw4ODw4ODw4ODg8ODg8ODisPDg4rDgANBQAAAAAAAA=='


if (tv_vol > slider_vol):
    num_loop = tv_vol - slider_vol  
    service_data = {'host': '10.0.0.12', 'packet': vol_dwn}
    for x in range(num_loop):
        hass.services.call('broadlink', 'send', service_data, 'False')
        time.sleep(0.5)
    hass.states.set('input_number.tv_volume', slider_vol, 'False')
else:
    if (tv_vol < slider_vol):
        num_loop = slider_vol - tv_vol  
        service_data = {'host': '10.0.0.12', 'packet': vol_up}
        for x in range(num_loop):
            hass.services.call('broadlink', 'send', service_data, 'False')
            time.sleep(0.5)
        hass.states.set('input_number.tv_volume', slider_vol, 'False')
    else:
        pass

and here is the error I get…

Log Details (ERROR)
Logger: homeassistant.components.python_script.tv_volume.py
Source: components/python_script/__init__.py:205
Integration: Python Scripts (documentation, issues)
First occurred: 2:14:22 PM (1 occurrences)
Last logged: 2:14:22 PM

Error executing script: unsupported operand type(s) for -: 'str' and 'str'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/python_script/__init__.py", line 205, in execute
    exec(compiled.code, restricted_globals)
  File "tv_volume.py", line 8, in <module>
TypeError: unsupported operand type(s) for -: 'str' and 'str'

Posts: 1

Participants: 1

Read full topic

High processor usage of python3, drives processor to high temps

$
0
0

@krash wrote:

Hey guys,

I have HA installed on ubuntu + docker laptop with an old i3 cpu.

It’s generally running ok, but every now and then i hear the fan going up.
I check the hassio cpu usage and it’s low, 25-30% as usual
image
If i go to Glances though, i get a 100+% usage from python 3.


Which, i have no idea how to troubleshoot (not a savvy here, just installed using the documentation).
It goes away with a restart or reboot.

Any pointers on how to start troubleshooting?
Thanks in advance.

My whole glances page:


Posts: 1

Participants: 1

Read full topic

Template switch help?

$
0
0

@pppaulie_s wrote:

Hi everyone :slight_smile:

Here’s the scenario I have:

  • a Windows PC with IoT service running (so I can send “shutdown” commands to shutdown Windows).
  • The windows PC BIOS has been set to automatically turn on the PC when power is supplied
  • TP Link power socket is used as the switch to supply power to the PC

Can someone please help me create a switch that does the following:

TURN ON:

  • turn on = switch.tplink_computer1

TURN OFF:

  • send MQTT Shutdown to IoT service on Computer1 (topic: “iotlink/workgroup/computer1/commands/shutdown”)
  • wait 5mins (ample time for Windows to shutdown)
  • then turn off = switch.tplink_computer1

Not sure how to do this exactly? Is a template switch the answer?

Thank you in advance :slight_smile:

Posts: 1

Participants: 1

Read full topic

Need Delay value equal to length of day

$
0
0

@jeffehobbs wrote:

I have an automation where I’d like it to come “on” at sunrise and “off” at sunset. It would be great to have a delay the length of the day, so I could slot that into the action: portion of the automation. Is there a way via templating to get that value?

Or, I’m open to: Is there just a simpler/better way to accomplish this than an automation delay?

Thanks!

Posts: 1

Participants: 1

Read full topic

Viewing all 109372 articles
Browse latest View live


Latest Images