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

(un)Conditional Card :card_index_dividers:

$
0
0

Hello fellow home Assitors!

I have a problem and you are here to solve it - right?

I’m having this nice conditional “stack” card which (depending on the state 1 to 5) shows always only one of the 5 images defined:

The yaml:

type: vertical-stack
title: Fire Risk Today
cards:
  - type: conditional
    conditions:
      - entity: sensor.fire_risk_today
        state: '1'
    card:
      type: picture-entity
      entity: sensor.fire_risk_today
      image: 'https://www.ipma.pt/bin/icons/svg/rcm/out-Reduzido.svg'
      aspect_ratio: 30%
      show_name: false
      show_state: false
  - type: conditional
    conditions:
      - entity: sensor.fire_risk_today
        state: '2'
    card:
      type: picture-entity
      entity: sensor.fire_risk_today
      image: 'https://www.ipma.pt/bin/icons/svg/rcm/out-Moderado.svg'
      aspect_ratio: 30%
      show_name: false
      show_state: false
  - type: conditional
    conditions:
      - entity: sensor.fire_risk_today
        state: '3'
    card:
      type: picture-entity
      entity: sensor.fire_risk_today
      image: 'https://www.ipma.pt/bin/icons/svg/rcm/out-Elevado.svg'
      aspect_ratio: 30%
      show_name: false
      show_state: false
  - type: conditional
    conditions:
      - entity: sensor.fire_risk_today
        state: '4'
    card:
      type: picture-entity
      entity: sensor.fire_risk_today
      image: 'https://www.ipma.pt/bin/icons/svg/rcm/out-MuitoElevado.svg'
      aspect_ratio: 30%
      show_name: false
      show_state: false
  - type: conditional
    conditions:
      - entity: sensor.fire_risk_today
        state: '5'
    card:
      type: picture-entity
      entity: sensor.fire_risk_today
      image: 'https://www.ipma.pt/bin/icons/svg/rcm/out-Maximo.svg'
      aspect_ratio: 30%
      show_name: false
      show_state: false

You can see all images in the card editor:
image

but only the one “active” when live:
image

But it reserves all space for the hidden 4 images (all other cards are forced to the right):
image

:bowing_man:

2 posts - 1 participant

Read full topic


Can I use a zone in a Conditional care

$
0
0

I have cards that I do not want to show unless my car is in the driveway. The vehicle integration has a device_tracker entity that I wan to tie in to.

Thanks!

1 post - 1 participant

Read full topic

Vertical scrolling navigation for one page lovelace mobile view

$
0
0

Hello Community

I’m wanting to create a one page mobile-only Lovelace dashboard and use DIV / CSS ID or JS navigation to automatically scroll down to the relevant section on the same page. I suspect it could be achieved with card-mod but I can’t wrap my head around it.

For example this website when you click the Contact menu option, https://widr.nkfrv.com/

I’d love to know if anybody has had any experience with this, or any thoughts as to how it can be done

1 post - 1 participant

Read full topic

iOS actionable notifications no longer working

$
0
0

I had iOS actionable notifications working last fall, but now they aren’t. I updated my HA for the first time since September, so that may have caused it. I’m currently on the most recent version. The notification will send, but there are not actions on the notification that I can click.

I learned about the new mobile_app: component, I added that to my config.yaml and logged in on the iOS HA app. Not sure if that is causing this.

Here is my config:

#mobile app config
mobile_app:

#ios https://www.home-assistant.io/docs/ecosystem/ios/
ios:
  push:
    categories:
      - name: DryerOff
        identifier: 'dryeroff'
        actions:
          - identifier: 'OPEN_DRYER'
            title: 'Open Dryer'
            activationMode: 'background'
            authenticationRequired: no
            destructive: no
            behavior: 'default'

Here is automation code

  alias: SA-iPhone-Notification-Dryer-Off
  initial_state: 'on'
  trigger:
  - entity_id: binary_sensor.five
    from: 'on'
    platform: state
    to: 'off'
  condition:
  - condition: state
    entity_id: switch.semi_auto_mode
    state: 'on'
  action:
  - data:
      data:
        action_data:
        push:
          badge: 5
          category: dryeroff
          sound: fire-truck-air-horn_long-and-loud.wav
          attachment:
            url: https://randbfarms.duckdns.org/local/dryercam.jpg
      message: Dryer off. Dryer was on for {{ states('sensor.dryer_on_time') }}
      title: SEMI-AUTO MODE
    service: notify.ios_mikes_iphone_11

I recently added this part of the notification automation:

          attachment:
            url: https://randbfarms.duckdns.org/local/dryercam.jpg

I added this attachment part of the code at the same time as I updated HA. I only include that because I’m unsure if that is causing the issue or if I updated and it’s a breaking change.

Any idea on how to correct this? Any help is appreciated.

1 post - 1 participant

Read full topic

YAML configuration kind of sucks. Any advice?

$
0
0

So I have been using home assistant for a while and think it is pretty great. However as my system become more complicated I am hitting some pretty big annoyances regarding the yaml configuration.

I am no ymal expert and I have a few inbuilt biases (why must some things insist on making white space important, please just let me use brackets, it’s more readable than guessing if that empty section is a space short when I’m not on a machine without a decent code editor /rant). Anyway I am finding that any time I want to add something to my system, I can’t just write a bunch of config at the bottom of my file to test things out because I can only have a single “input_boolean:” and a single “sensor:” etc that is in a separate include file. As such a single bit of functionality such as a zigbee2mqtt setup, requires me to go paste a small bit of config in my sensor file, some stuff in my automation and timing file for allowing new devices to join. By the time I’m done I have stuff spread out across my config files that I have to bounce around and change as I debug things to get the new stuff working well.

What I would like to do is have all this functionality in a single include file that I could call a sensible name such as zigbee2mqtt.yaml, and in it have all the relevant input booleans, sensors and automatons in one logical place. It would be amazing to effectively have a more object oriented setup where I could simply add a new entity to the input_boolean object from anywhere.

So if there is any advice or wisdom out there on ways I can improve what I am doing I would love to hear it.

3 posts - 2 participants

Read full topic

'Solar as a percentage of home usage' sensor

$
0
0

I’m trying to build a solar percentage sensor to show how much of the home usage was solar and how much from the grid.
I’m struggling with the template.
I’m trying to action…

100 / consumption * production

# Renewables Percentage Sensor
  - platform: template
    sensors:
      daily_solar_percent:
        value_template: '{{( int 100 | float * 1.0 ) / (states.sensor.enph_envy_daily_consumption.state | float | round(1) ) * (states.sensor.envoy_daily_production.state)}}'
        unit_of_measurement: '%'
        friendly_name: Daily Solar Percentage

not winning so far :open_mouth:
would welcome a little help if anything looks obvious or there is a better approach?

Thanks :slight_smile:

1 post - 1 participant

Read full topic

Pairing Hue bulbs

$
0
0

How can I have one hue lamp (bulb) connected to a switched outlet (dumb on-off switch), turns on and off through wall switch, control another Hue lamp (bulb) not connected to same switched outlet to turn on and off as the other switched bulb? Can this be done through the Hue app, or how can it best be done with Home assistant? Basically I want both bulbs controlled through wall switch without using the Hue app or Home assistant app. Any suggestion is appreciated, thanks.

3 posts - 1 participant

Read full topic

Switch with curtain/cover visualisation?

$
0
0

Hi guys

I have searched quite a lot but haven’t found an answer yet to my problem so I’m hoping I can get some help here.

I have switches that control curtains through a simple KNX actuator, this is one of them:

switch:
  - platform: knx
    name: curtain.f1
    address: '0/0/1'
    state_address: '0/2/0'

This works fine and the state address represent the actual position.
Now I’m looking for a way to change the switch button with a curtain/cover and of course a way to see/know the current position.

Can any of you put a newbie in the right direction please?
Thanks a lot in advance!
Nick

1 post - 1 participant

Read full topic


Tuya switch state slow to change,

$
0
0

I am running some Tuya compatible plugs, for various things like lamps and heaters.

I had it working properly. But now, if I turn any of the plugg on (or off) in home assistant, the plug itself responds in a timely manner, but the device entity state in home assistant does not change.

If I look at my lovelace ui icon with a simple button, it does not change to show the current state of the device. Here is the yaml for a relevant button card.

entity: switch.88138834c44f33917a96
hold_action:
  action: more-info
show_icon: true
show_name: true
tap_action:
  action: toggle
type: button

Sorry I am a newbie. but, what am I missing here.

thanks

2 posts - 1 participant

Read full topic

How to set status based on REST

$
0
0

Hi,
As I’m trying to get data from my SolarEdge API and want some automation based on the resulting data.
inverter_sensor_nostatus
first. How can I set a state of the sensor?

  - platform: rest
    name: solar_inverter
    method: GET
    scan_interval: 1200
    #value_template: '{{ value_json.data.telemetries[0].inverterMode }}'
    #value_template: '{{ value_json.data.telemetries[0].L1Data.acVoltage }}'
    #value_template: '{{ value_json.data.count }}'
    value_template: '{{ value_json.value }}'
    json_attributes:
      #- data
      #- data.telemetries[0].inverterMode
      #- data.telemetries[0].L1Data.acVoltage
    resource_template: >-
      {% if is_state('sun.sun','above_horizon') %}
        {% set endTime = (as_timestamp(now()) - (60)) | timestamp_custom('%Y-%m-%d %H:%M:00') %} 
        {% set startTime = (as_timestamp(now()) - (420)) | timestamp_custom('%Y-%m-%d %H:%M:00') %}
        https://monitoringapi.solaredge.com/equipment/577721/73194029-F5/data.json?startTime={{startTime}}&endTime={{endTime}}&api_key=VQT4N3OUPAYPQYN9GNPLLQDCZ38TJ54Y
      {% else %}
        'Sleep Mode'
      {% endif %}

Am I doing this the right way?
I’m only interested in the specific data to set a status (based on a combination ) and trigger an alarm if something is wrong. How do I get this specific data? (I tried combination as remarked lines above, buit without the expected results)

thx in advance

1 post - 1 participant

Read full topic

Webhook and phone notification with custom message?

$
0
0

Hello all.
So I want a simple webhook to send me a phone notification with a custom message
So I have done the following as a test:
Screenshot 2020-06-15 at 12.29.53

The idea is just to receive a message with “hello Webhook ID” so that later on I could customise it.

Sadly this does not work and tells me the following:
Send me a notification: Error executing script. Unexpected error for call_service at pos 1: Error rendering data template: UndefinedError: ‘trigger’ is undefined

So for the program trigger is unknown, in every documentation I have read it specifies it like so… so I am very confused… Any help here ? thanks

1 post - 1 participant

Read full topic

Conditional Messages - system log

$
0
0

I was trying the following example:

Conditional Messages

This automation will create a persistent notification whenever an error or warning is logged that has the word “service” in the message:

automations.yaml

- id: Error_01
  alias: Create notifications for "service" errors
    trigger:
      platform: event
      event_type: system_log_event
    condition:
      condition: template
      value_template: '{{ "service" in trigger.event.data.message }}'
    action:
      service: persistent_notification.create
      data_template:
        title: Something bad happened
        message: '{{ trigger.event.data.message }}'

But nothing happens, no notifications. Also when I change “service” into “error” for example.
Can someone give me a hint what I’m missing here?

1 post - 1 participant

Read full topic

Strange SSL problem

$
0
0

Im having an issue with HA and SSL. I use my Asus router to handle my lets encrypt cert. It just expired yesterday so I created a new one with the router and exported the cert and key files.

Heres the problem, I have no issuse with the certs on my Synology and everything reports ok (getting a green lock). Using the exact same certs (as I have done many times before) HA refuses to connect securely. I have cleared cache etc but continue to get an NET::ERR_CERT_DATE_INVALID error.

If I check the details the date its says it expires yesterday.

Im stumped. Any ideas on solving this issue?

1 post - 1 participant

Read full topic

Displaying automations by last triggered

$
0
0

So lately I’m creating a bunch of automations, testing and sometimes I like to double-check and make sure they triggered correctly.

I am using the template below to see the automations trigged in the last 5 hours:

{% set mins = 360 %}
{%- for state in states.automation|sort(attribute='last') -%}
  {% set last = as_timestamp(state.attributes.last_triggered) %}
  {% set current = as_timestamp(now()) - (mins*60) %}
  {%- if (last != None) and last > current -%}
    {{state.entity_id}}: 
       last triggered: {{last|timestamp_custom("%H:%M") }}
  {% endif %}
{%- endfor -%}

It results in something like this:

automation.someone_arrived:
last triggered: 12:57

automation.disarm_alarm:
last triggered: 12:57

automation.sunset_lights:
last triggered: 17:21

automation.announce_visitor:
last triggered: 16:40

automation.dark_mode:
last triggered: 18:20

What I’d like to see is the last 5 or 10 automations sorted by when they were triggered, with the newest entry on top.

Is there any sorting I can add to this template? Any add-on I should look for? A new automation?

Thanks in advance!

2 posts - 2 participants

Read full topic

Need help configuring proximity via icloud

$
0
0

Hi all,

first of all, I’m just starting with HA, so please excuse me if I missed some documentation/post about this:

We only have iPhones and MacBooks at home, so I was trying to create proximity notifications where HA pulls location data via iCloud (not via HA App - this way people cannot cheat by deleting the app).

For example, my wife went shopping, took her iPhone with her (device_tracker.wife_iphone shows away), but person.wife is at home). The following devices are connected to her person:

- device_tracker.wife_iphone
- device_tracker.wife_ipad
- device_tracker.wife_macbook

is this something I did not configure correctly? Is there a way to set if one devices is not at home, person is also not at home

Thanks,
Andrei

1 post - 1 participant

Read full topic


Template Switch not calling services

$
0
0

I have a template switch, based on the examples in the docs, but it’s not firing the turn_on or turn_off services. I can see that the template has changed state from the logbook and history, but the lights connected to the template switch never get turned on:

  living_room_soft_lights_copy:
    value_template: "{{ is_state('switch.living_room_soft_lights', 'on') }}"
    turn_on:
      service: light.turn_on
      data:
        entity_id: light.living_room_lights
    turn_off:
      service: light.turn_off
      data:
        entity_id: light.living_room_lights

I can’t see anything wrong with this config. Have I missed something obvious or is there a bug in Home Assistant?

4 posts - 2 participants

Read full topic

VNC connection to Deconz stopped working

$
0
0

Please excuse my ignorance as i’m fairly new to home assistant and home automation in general.
The fact that i spent two hours yesterday trying to connect to deconz through VNC viewer should attest to this.

The documentation gave an example URL that looks like “vnc://homeassistant.local:5900” and eventually “hassio.local:5900” was the URL I got working. I got access to the mesh network of Zigbee devices, looked around a bit and then went to bed.

Today, when I try to connect to the same URL in VNC, the connection times out. I have changed nothing from when I got it to work yesterday. This is really starting to frustrate me. What am I doing wrong?!

Timed out waiting for a response from the computer - This is the error i get from VNC

I have tried restarting the Rasberry Pi, Home assistant, and the PC im trying to connect from. But now i’m kind of lost as what to try next…

1 post - 1 participant

Read full topic

Xiaomi IR remote ChuangmiIr (magic error) when sending command

$
0
0

I managed to configure the remote by retrieving the token and everything. got it to learn ir RAW from remote. but when i try to send command, i got error (magic error -5008) . tried removing one and both ‘=’ at the end. search around finds that removing space between RAW and codes helps, but mine nvr had space in the first place. i m at lost now.

1 post - 1 participant

Read full topic

Garden Irrigation Questions

$
0
0

Hi,

I am wondering what is the advantage of Opensprinkler or one ot the commercial irrigation controls out there over some HA automations coupled with zigbee plugs and 24v valves? I have rain, wind and temp sensors, would this be enough to implement a HA only irrigation system? My garden is not that big, maybe 6 or 8 valves would be more than enough.

1 post - 1 participant

Read full topic

Arduino IDE on home assistant

$
0
0

I know that we can train the Arduino IDE on a Raspbarry, I would like to know if there is a possibility to install the Arduino IDE on the home assistant. I have some arduino connected via serial, if this were possible it would make it very possible to update the arduino programming.

1 post - 1 participant

Read full topic

Viewing all 96092 articles
Browse latest View live


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