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

TemplateError('ValueError: Template error: as_timestamp got invalid input

$
0
0

Hello, I have a problem with a template. I mean in earlier HA versions there was no error message. The actually version is core-2022.6.6.
Unfortunately, I can’t get along with the template programming. Maybe someone can help me with this?

Log:

TemplateError('ValueError: Template error: as_timestamp got invalid input '' when rendering template '{{ as_timestamp(states.binary_sensor.bwm_flur.last_changed)|timestamp_custom('%d.%m.%Y %H:%M') }}' but no default was specified') while processing template 'Template("{{ as_timestamp(states.binary_sensor.bwm_flur.last_changed)|timestamp_custom('%d.%m.%Y %H:%M') }}")' for attribute '_attr_native_value' in entity 'sensor.bwm_flur_last_motion'

Template:

- sensor:
    - name: "bwm_flur_last_motion"
      state: "{{ as_timestamp(states.binary_sensor.bwm_flur.last_changed)|timestamp_custom('%d.%m.%Y %H:%M') }}"
      icon: mdi:clock-time-four-outline

2 posts - 2 participants

Read full topic


Outlet marked as dead after automation turns it off

$
0
0

I have a new HomeAssistant Z-Wave JS setup that’s working fine with all of my devices, except for a GE/Jasco 45605 outlet. I can control the outlet fine until a nightly automation runs to turn it off, then it’s instantly marked as “dead” in ZWave JS and I have to remove and re-add it to get it back. This happened first with a Zooz 700 stick, but I tried an Aeotec stick 5+ and it’s still happening. The outlet was working just fine with my previous ZWave controller (Hubitat) and was never marked dead.

Is this a possible ZWave JS bug, or am I missing something?

2 posts - 1 participant

Read full topic

Turn off Alarm before opening the garage door

$
0
0

My current card is set to to use garage door zone to open the garage door (by tapping it once). However, at times I forget to disarm my alarm before opening the door and that triggers the alarm. Can someone suggest how to incorporate the condition to check if the alarm is on to first disarm before trigger the garage open call service:

type: vertical-stack
view_layout:
  position: main
cards:
  - type: alarm-panel
    entity: alarm_control_panel.partion_1
    states:
      - arm_home
      - arm_away
    name: Alarm
  - type: custom:vertical-stack-in-card
    cards:
      - title: Sensors
        type: glance
        show_header_toggle: false
        state_color: true
        entities:
          - entity: binary_sensor.zone_3
          - entity: binary_sensor.zone_4
          - entity: binary_sensor.zone_2
          - entity: binary_sensor.zone_9
            entity_id: alarm_control_panel.partion_1
            name: Garage door
            state:
              - value: open
                color: rgb(5, 147, 255)
              - value: Closed
                color: rgb(189, 255, 5)
            tap_action:
              condition:
                condition: state
                entity_id: alarm_control_panel.partion_1
                state:
                  - "armed_away"           
              action: call-service
              service: envisalink.alarm_keypress
              service_data:
                keypress: D
                entity_id: alarm_control_panel.partion_1
  - type: entity
    entity: sensor.partion_1_keypad
    icon: mdi:alarm-panel
    state_color: true

1 post - 1 participant

Read full topic

Zooz ZSE40 Motion Sensor Help Beginner Guide

$
0
0

New to Home Assistant and new to working with motion sensors.

Question is what am I doing wrong in setting up a simple motion detected turn the lights on/off automation (first one by the way)?

Situation:
I’ve done all the proper set-up using the GoControl CECOMINOD016164 HUSBZB-1 USB Hub, set-up the Z-wave JS Integration, and followed the proper set-up similar to this video. Everything looks to be sensing properly (see screenshot attached).

I do have some grayed out ones, wondering if that’s the problem and if i need to start from scratch and bring those entities in as well? I then set-up the automation (super easy), ran the actions and tested it properly, everything worked perfect.

I enabled it and tried it out with no manual triggers, and I’m getting nothing back. Nothing in the logbook, no lights, literally nothing.

Guess I’m truly asking is where did i go wrong and why do I not see any sign/feedback? I ideally would like to see in the logbook that motion detection has been detected, but throughout my tests and configuration, I’ve got nothing indicating the motion sensor works/set-up/on.

Hope I provided enough info and links/images. Let me know if you need anymore info to diagnosis it further.

Thank you in advance!

KRB

1 post - 1 participant

Read full topic

Timestamp modification for Sensor

$
0
0

Hi There,

I have a sensor, which will report the estimated time when charging the car will be finished.
This sensor provides an Timestamp (UTC) - so while using the Timestamp as it is, I am getting not the correct time displayed in my dashboard (since I am not in a UTC time Zone).

Therefore, I want to create a template sensor to format the Timestamp:

estimated_end:
  friendly_name: "Vorraussichtliches Ladeende"
  value_template: >-
  {{ as_timestamp(states('sensor.openwb_cp1_voraus_ladeende'), now() | as_timestamp()) | timestamp_custom('%d.%m.%Y %H:%M', true) }}

is my current setup - which will provide the following Output:
“Vorraussichtliches Ladeende”: 17.06.2022 08:20

Currently, the sensor is showing “unknown” - when no charging takes place - therefore, I am running into an issue when trying to convert the timestamp in that situation.
Is there a way, how I can set the sensors default value back to “unknown” instead of the _now() | as_timestamp?

1 post - 1 participant

Read full topic

Invert the icon state color

$
0
0

Hi there,
is there a way to invert the sensors state icon color?

to be more specific:
grafik

The icon from this sensor (Charging cable / Locked or Unlocked) will be shown in color when it is unlocked.
But I would like it to be shown in color, when it is locked…
Is there a way to do that in lovelace directly? or do I need to create an template sensor for this somehow?

1 post - 1 participant

Read full topic

MQTT sensor how to use timestamp for data

$
0
0

Hi,
I have mqtt sensor which reports temp data into MQTT. It works fine. I have in HA enable autodiscovery, so sensor is found automatically. But I have small issue, when sensor is offline, the value of temp is still the same until it changes in mqtt again.
You can see it in picture.

What can I add to mqtt values so it doesnt show when offline, would timestamp help? basically I just want to see a gap in there. i dont see like timestamp value in mqtt sensor doku.

Regards,
JIV

1 post - 1 participant

Read full topic

Parkside smart watering timer - ZHA - How to change Time Left attribute

$
0
0

Hey,
I’m new to HA.
I was able to pair this watering zigbee timer with Zigbee Home Automation (do not want to use z2m).
This device has a timer set by default to 1 minute. Each time you turn on the device the time left is set, and close after 1 minute.
I did not find how to change this cluster attribute. I’ve tried with ZHA ToolkitService: attr_write, but I’m not able to make any change.
The only thing that works, is to make an automation, that repeat each 50 seconds to turn on the device. This reset the timer to 1 minute every time. It repeat this 36 times for 30 minutes.

Does anyone has an idee how to make change to this internal device timer ?
It is set as 0 when the device is off (close), and to 1, when is on (open).

Thanks for your help !
Best

1 post - 1 participant

Read full topic


Closest device to a group of zones

$
0
0

Hello,

For a long time (over a year) I had a working automation based on a distance from a tracker to closest zone in a group.

{{ (distance('device_tracker.320i_xdrive', closest('device_tracker.320i_xdrive', ['group.sppn']) ) * 1000 )|round(0, 'ceil') }}m

Since version 2022.5 (or so) is stopped working. It’s probably connected to changes in zone state.
So, does it suppose to work? Here is documentation Templating - Home Assistant and it’s true I don’t see this specific kind of example.

The use case here is I have a few parking meters as zones. I need to know the closest parking meter to my parked car to check if it’s parked close enough to be counted against my subscription. If it’s not, push notification to avoid parking ticket.

1 post - 1 participant

Read full topic

Script turn on call with variables

$
0
0

Hello,

I am writing an automation where i try to run a script with my variables. All works, but.

I need to use script.turn_on to queue multiple script calls.
how to write it correct?

My action in my automation (this works):

service: script.vysavaj_script
data:
  room: 16
  izba: vac_pracovna

What am i trying to do:

service: script.turn_on
    entity_id: script.vysavaj_script
    data:
      variables:
        room: 16
        izba: vac_pracovna

this throws me an error:

Message malformed: Unable to determine action @ data[‘action’][0][‘then’][0]

Thank you.

2 posts - 1 participant

Read full topic

Help with the Generic Hygrostat for Home Assistant - installed with HacS

$
0
0

I installed the generic hygrostat with HACS and up my binary sensor as follows:

binary_sensor:
  - platform: generic_hygrostat
    name: Bathroom Hygrostat
    sensor: sensor.bill_br_govee5075_humidity # Source humidity sensor
    delta_trigger: 3 # Optional humidity swing to detect. Default = 3
    target_offset: 3 # Optional dehumidification target offset. Default = 3
    min_on_time: 300 # Optional min on time in seconds. Default = 0 seconds
    max_on_time: 1800 # Optional safety max on time in seconds. Default = 7200 seconds
    sample_interval: 30 # Optional time between taking humidity samples in seconds, default 300 seconds
    min_humidity: 45 # Optional minimum humidity to enable dehumidification. Default = 0
    unique_id: bill_bathroom_hygrostat # Optional ID that uniquely identifies this sensor. Set this to a unique value to allow customization through the UI

No errors in HA, but I am getting null values for items in the sensors:
image

Not sure what I have done incorrectly? I followed the directions here:

https://github.com/basschipper/homeassistant-generic-hygrostat

Does this integration still work in Home Assistant?

1 post - 1 participant

Read full topic

How to convert "Overview" back to automatic mode?

$
0
0

“Overview”, the default dashboard, is generated automatically by default. One can take control over it in order to add custom items to it. But how do I convert it back to automatic if I’ve taken control by accident?

2 posts - 2 participants

Read full topic

Template condition automation not right

$
0
0

Hello there

I have been pulling my hair out to try and resolve a simple automation/ condition out but cant get it right.

Here is my code:

  trigger:
  - platform: state
    entity_id: binary_sensor.sm_s906b_is_charging
    to: 'on'
  condition:
    condition: and
    conditions:
      - "{{ state_attr("sensor.ahmeds22_room_presence", "distance") == '0.1' }}"
      - condition: state
        entity_id: sensor.ahmeds22_room_presence
        state: 'Livingroom'
  action:
  - service: notify.alexa_media
    data:

but I get an error saying:

2022-06-17 11:16:24 ERROR (MainThread) [homeassistant.components.automation] while parsing a block collection
  in "/config/automations.yaml", line 17, column 7
expected <block end>, but found '<scalar>'
  in "/config/automations.yaml", line 17, column 25

Can anyone shade some light as to what I am doing wrong? Thanks.

1 post - 1 participant

Read full topic

Mobile Phones not Recognised

$
0
0

For some strange reason both mine and my wife’s mobile phones are not recognised as being at home? They were previously recognised, yet over the past few months that has ceased? I’ve tried a number of config changes to fix the problem, but no success.

My tablet is recognised, but not our phones. Very strange? Any ideas greatly appreciated?

3 posts - 2 participants

Read full topic

Automation condition failing for condition/OR

$
0
0

The automation should only run when one or the other input_boolean in set to “on”.
Setting up the automation in the GUI gives me this code and it fails (when only the first condition is there it works):

alias: 1. Test- Time trigers
description: ''
trigger:
  - platform: time
    at: '13:05:00'
condition:
  - condition: state
    state: 'on'
    entity_id: input_boolean.ha_mode_home
  - condition: or
    conditions:
      - condition: state
        entity_id: input_boolean.ha_mode_night
        state: 'on'
action:
  - service: notify.me
    data:
      title: HA - Test
      message: Test triggerd at {{ now().strftime("%H:%M") }}
mode: single

Whats wrong with the “OR” statement (generated from the GUI)?

1 post - 1 participant

Read full topic


Browser_mod problems

$
0
0

Hello,

I have 2 problems with the integration of browser_mod…

First of al the browser-player card : I put it on an existant dashboard and works fine (I can see the entity-id)…on my tablet and laptop, but not on my smart-phone ? On my smart-phone I get the error “Custom element doesn’t exist: browser-player”.

Second problem : I put this in my configuration.yaml file

browser_mod:
  prefix: "browser_mod_"
  devices:
    b4ea8a92-443fa8e5:
      name: laptop_christian
    a5de7b8c_eb62e08d:
      name: tablet_christian
    53fa2164-21f071cf:
      name: laptop_alex

In my automatisation I put this :

          - service: browser_mod.navigate
            data:
              navigation_path: /lovelace-mushroom/0
              deviceid:
                - tablet_christian

This works fine, except that the navigation is done on my tablet but also on my laptop ?

What am I doing wrong ?

4 posts - 2 participants

Read full topic

Power Meter (Energy use ) PROBLEM

$
0
0

HI i just connected my home assistant to homey with mqtt i need how to integrate energy meter vaule into a energy dashboard .In the Grid consumption list dont show the energy meter device entity . there is a solution to this problem ? I thought a virtual device with the given values should be set up ?
entity : sensor.elektromer_power
Device settings can be modified

1 post - 1 participant

Read full topic

Aoetec Smart Switch 7 does not restore state after power failure

$
0
0

I have an Aoetec Smart Switch 7, FW 1.3

Upon power failure the device sometimes restores it state to off, rather than restoring to current state.

I have the config parameter to restore state set to its default

Any advice?

1 post - 1 participant

Read full topic

Probem to update core (2022.6.6)

$
0
0

Hello guys,

I faced this problems but I always could “fix” it.
The updates was taking a lot of time to update and now it keeps running and nothing. This last time, I tried to update through SSH, and nothing too. I did it before go to bed and in the morning I checked

Processing... Done

Post "http://supervisor/core/update": context deadline exceeded (Cliente. Timeout exceeded while awaiting headers)

For eg the addons page doesn’t load and it doesn’t restart (on lovelance and SHH) when I try to. I need to plug the energy off and plug it again.

I will post the log on the next post…

I don’ t know if there is somenthing with this installation. I tried to to make a new build and restore the backup, but it didn’t work.

Does anyone know what I can do to fix it?

2 posts - 1 participant

Read full topic

Energy Dashboard Only Has Three Weeks of Data

$
0
0

I’ve noticed that I only have three weeks worth of history in my Energy usage. I’m using the default config and not excluding anything. I’ve tried my best to find an answer, but haven’t found anything. Is there a configuration I need to change so that I can have long term data?

1 post - 1 participant

Read full topic

Viewing all 108980 articles
Browse latest View live


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