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

Too many entities

$
0
0

Zwavejs2MQTT user here
I’ve integrated HA to Zjs2M, and generally speaking all works fine
I assigned area and name to all devices at Zsj2M UI

I see too many entities on AH, it make my mind blow :slight_smile:


One from MQTT without area, and name with “Kids”
One from Z-waveJS with area and name from Zjs2M

What should I do here to get cleaner look ? disable MQTT ? hide ?

1 post - 1 participant

Read full topic


Returning a variable value from Sensor

$
0
0

Hi, I am trying to write a custom rest sensor that tells me if it is a public holiday. I am basically wanting to a have a default value of 0. The sensor calls an api that gets all the public holidays. The sensor loops around the values and checks if the date is the same as today and if it is sets the flag to 1.
This works but I can’t figure out how to get the default value returned . At the moment I just get the default even though the check does set the variable to 1. This is my code (updated for developer console). Feels like I am using the variable wrong.

{% set value_json = 

{"meta":{"code":200},"response":{"holidays":[
{"name":"New Year's Day","description":"New Year\u2019s Day is a public holiday in New Zealand on January 1 each year.","country":{"id":"nz","name":"New Zealand"},"date":{"iso":"2022-05-08","datetime":{"year":2022,"month":1,"day":1}},"type":["National holiday"],"locations":"All","states":"All"},
{"name":"New Year's Day","description":"New Year\u2019s Day is a public holiday in New Zealand on January 1 each year.","country":{"id":"nz","name":"New Zealand"},"date":{"iso":"2022-01-01","datetime":{"year":2022,"month":1,"day":1}},"type":["National holiday"],"locations":"All","states":"All"}
]}} %}

{% set public_holiday = 0 %}
{% if value_json is defined and value_json.response is defined %}
  {% for entry in value_json.response.holidays if entry.date.iso == now().date() | string and now().hour | string in '1, 2, 3, 4' %}
    {% set public_holiday = 1 %}
  {% endfor %}
{% endif %}
{{ public_holiday }}

1 post - 1 participant

Read full topic

Filter time_simple_moving_average stopped working correctly recently

$
0
0

I’m using a sensor with a filter:time_simple_moving_average to tell whether my power-saving washing machine is finally done with its cycle. It had worked perfectly for several months, but a few weeks ago it’s started thinking the thing is always on. I haven’t changed the code, and from what the graph looks like, it should be turning off. Did something in the code change recently with an update that would have affected this? Have I been doing it wrong all along? Is there a better way to do this? Here are screenshots of the graphs of what it’s filtering, what it’s reporting, and then the code of the filter itself. I’m baffled.


## WASHING MACHINE ##
## Makes the washing machine on/off sensor work with the power saving thing ##
  - platform: filter
    name: "filtered washer power 2"
    entity_id: sensor.sonoff_10012f02d4_current
    filters:
      - filter: time_simple_moving_average
        window_size: 0:05
## END WASHING MACHINE ##

1 post - 1 participant

Read full topic

ESP01-S Problem Setting Up in ESPHome

$
0
0

Hi, I have a couple of ESP-01s modules around and I’m starting to do some ESPhome installations, but this specific module I just can’t get it to work…

I read similar posts with similar issues, I implement some suggestions like manual IP configuration, or disable OAT configuration, but nothing seems to work…

I know that around October of 2021 there was some bug around this modules that I think it get fixed, but don’t know for sure.

The first solution I want to add is to control two relays with the ESP-01 I Already have the system working outside Home Assistant with Blynk is an old solution but now I would like to add the device to my Home Assistant…

I can program the ESP from the computer at the end it shows me the message “Configuration created but unable to detect the device on the network”

which would make sense since I have to put the device in running mode.

But the device doesn’t show up for configuration in the Home Assistant and when I tried to get to the Log Wirelessly this message is shown

I have been trying a lot of things, I even downloaded the bin file and updated by myself with other program because at this point I’m not even sure if is flashing correctly…

Thanks for the help!!

1 post - 1 participant

Read full topic

How UI knows device class state name?

$
0
0

I have a binary sensor set to device_class: window
The entity card shows its state as open and close which is expected.
But Dev Tools shows the state as on and off
From this point, it’s not surprising that 3rd party cards like custom:button card show on/off too.

Is anyone able to explain this inconsistency, or has every single card secure this conversion on its own?

thanks in advance

1 post - 1 participant

Read full topic

Different card on tap

$
0
0

I would like to use a picture entity card and when I tap it a popup with a different card type or card comes up. Is this possible?

1 post - 1 participant

Read full topic

Templates for zwave_js.event trigger platform?

$
0
0

I have a simple script where I want to wait for a “metadata updated” zwave node event for a given device (and then ping it), but I want to be able to pass the device_id as a parameter to the script:

alias: Wait and Ping
sequence:
  - wait_for_trigger:
      - platform: zwave_js.event
        device_id: '{{ device_id }}'
        event_source: node
        event: metadata updated    
  - service: zwave_js.ping
    data: {}
    target:
      device_id: '{{ device_id }}'
description: Wait and Ping
fields:
  entity_id:
    name: Device ID
    required: true
    selector:
      device: null
mode: parallel

However, whenever I try to save/validate my script I get the error "Message malformed: No nodes found for given device_ids or entity_ids."

Does the zwave_js.event trigger platform just not support templates?

1 post - 1 participant

Read full topic

Is It Possible to Get the Last Alexa Voice Command?

$
0
0

Hi, I would like to get the last command that was requested to an Alexa. e.g. If I say “Alexa, set a 2 minute timer”, I want to be able to capture the wording of that command.
My goal is to be able to display timers in large text on a dashboard so that we can see the timer clearly.
I was thinking of doing this:

Capture Command
Check if text contains ‘timer’
Get the value from it e.g. “2 minute”
Create my own version of a timer in a Sharptools dashboard.
Change the current dashboard to the timer dashboard.

Possible?

1 post - 1 participant

Read full topic


Is there a way to use the RPi as a WiFi bridge?

$
0
0

Hi
In my setup, my ISP provided hub/router is in the living room next to my TV/Amp.

I have WiFi power strips around my apartment and it all works fine with a decent enough signal strength until I watch TV and then the WiFi power strips in my spare room/office disconnect from HA.

My office is ethernet connected and it’s how I connect the HA RPi, so I was wondering if there’s a way to repurpose the RPi 's built in WiFi to act as a bridge to the main hub’s WiFi signal?

Have any of you used your RPi to extend your WiFi to other rooms?
If so, were you able to set it up as a bridge connection (not an access point)?

2 posts - 2 participants

Read full topic

Smartthings Integration Reload Button not working

$
0
0

Hi all,

I am having issues with the “Reload” button on the Smartthings Integration. I have essentially deleted a bunch of items on the smartthings side and would like those changes to be seen on the Home assistant side. Is that what the “reload” button is for on the configuration window for the smartthings integration? After hitting that and restarting HA, it never seems to refresh anything on the HA side. Can anyone give me any guidance or is the reload button not working on many peoples smartthings integrations. Thank you all!!

1 post - 1 participant

Read full topic

Genie Voice Assistant + Light Groups

$
0
0

Just got a remote Raspberry Pi4 setup with a conference mic for offline voice control.
Looking for anyone with knowledge as it is very sparse on documentation.

I can control all devices just fine but one gripe is if I have devices with similar names(eg: a group of lights setup as a Group named Master Bathroom Lights) each of them being numbered and use Genie with the phrase “turn on the master bathroom lights” it states “there are multiple lights named that, which one?”

The current workaround is to say “turn on all the master bathroom lights” but was wondering if there was a way to modify this behavior?

1 post - 1 participant

Read full topic

Live camera steam not working on android device (fully kiosk)

$
0
0

Hi All,
I am having trouble incorporating a live camera feed to Home Assitant.

  • The issue is that i am not able to stream the live feed in my android tablet.

I have found some articles related to the lack of codec (H.265/H.254/AdobeFlash?) support in Andriod. I’m sure there is a way around this but I can’t seem to find any concrete solution.

Im using a Anran (AR-W620) camera to pull a RSTP feed. it functions fine on my desktop and iPhone. The card was added to HA using the Generic Camera platform using Raspberry pi 4.

View on my Android tablet using chrome :

camera:
  - platform: ffmpeg
    name: Anran
    # substream = small window
    input: rtsp://admin:password@192.168.0.199:554/11

tags Fully-Kiosk, Anran, live-camera,rstp

2 posts - 1 participant

Read full topic

Duplicati login error on HASS panel when access duckdns URL

$
0
0

When I use DuckDNS domain to access HASS, the iframe duplicati is getting this error:

My configuration file:

panel_iframe:
  duplicati:
    title: "Duplicati"
    url: "http://192.168.1.8:8200"
    icon: mdi:backup-restore
    require_admin: true

When I use internal IP to access HASS. Everything works fine.
Does anyone know how to fix it?

My HASS core: 2022.5.0
I’m using HASS Container on RaspberryPi, and access to DuckDNS domain from the same network (wifi).

Sorry because I dont know where category to put this topic.

1 post - 1 participant

Read full topic

Sonoff Device Offline

$
0
0

is there a way to check if sonoff device gets offline Then perfom other task?

1 post - 1 participant

Read full topic

800 MHz - Iris Pool Lighting Controller


Get user who triggered a mobile app notification action event (Actionable Notifications)

$
0
0

We make use of Actionable Notifications for a handful of alerts that require attention. In one scenario, (via a window/door sensor) we each see an Actionable Notification on our mobile devices advising that the mail was delivered. This notification contains a single Action allowing one of us to tap on it to set the mail as “Checked” in HA (via boolean). When one of us taps on this Action, the original notification is cleared via automation and a new notification is sent to our devices advising that the mail was checked to prevent multiple visits to the mailbox by each of us.

This is working well, however, if I am the one who checked the mail I would like for everyone else except for me to see the “Mail was checked.” notification - since I’m the person who tapped the Action I’m already fully aware. This would save me the extra swipe-away of the notification.

I searched the forums and came up with many answers advising how to get the user_id of the user who activated a trigger. Unfortunately, the solutions I found which stated to use trigger.to_state.context.user_id did not seem to apply to event type triggers.

Using the Automation’s Show Trace feature, my output was something similar to this:

this:
  entity_id: automation.action_mailbox_actions_event_handler
  state: 'on'
  attributes:
    last_triggered: '2022-05-08T04:17:23.528988+00:00'
    mode: single
    current: 0
    id: '1647420696426'
    friendly_name: 'Action: Mailbox Actions Event Handler'
  last_changed: '2022-05-08T04:17:08.814302+00:00'
  last_updated: '2022-05-08T04:17:23.583657+00:00'
  context:
    id: 0180a1e2e42069c1a1eb87e38e2cbe8e
    parent_id: 0180a1e242069cf75f8d96bdcdbb5cdf
    user_id: null
**trigger**:
  id: '0'
  idx: '0'
  platform: event
  **event**:
    event_type: mobile_app_notification_action
    data:
      tag: mail_not_checked
      title: Mail Delivered
      message: Mail needs to be checked.
      action_1_title: Set Mail Checked
      action_1_key: set_mail_checked
      action: set_mail_checked
      device_id: 3af1b42069e44214
    origin: REMOTE
    time_fired: '2022-05-08T04:55:18.782886+00:00'
    **context**:
      id: 0180a2059dfe42069929bc57a37f7eed
      parent_id: null
      **user_id**: ***[u]c784646142069412930c070176c9b19c[/u]***
  description: event 'mobile_app_notification_action'

I’ve highlighted the areas of interest using asterisks. So it would seem that, according to Show Trace output, mobile action event type triggers’ user_id info could be acquired using trigger.event.context.user_id, right? Well… not quite, but we are close!

Using dev tools to listen to event type mobile_app_notification_action and then tapping the Action on my mobile notification revealed the following:

{
    "event_type": "mobile_app_notification_action",
    "data": {
        "tag": "mail_not_checked",
        "title": "Mail Delivered",
        "message": "Mail needs to be checked.",
        "action_1_title": "Set Mail Checked",
        "action_1_key": "set_mail_checked",
        "action": "set_mail_checked",
        "device_id": "3af1b42069e44214"
    },
    "origin": "REMOTE",
    "time_fired": "2022-05-08T04:55:18.782886+00:00",
    "context": **{**
        "id": "0180a2059dfe42069929bc57a37f7eed",
        "parent_id": null,
        "user_id": "c784646142069412930c070176c9b19c"
    **}**
}

Great! This helps us along. Notice the braces above around the data contained within context - this tells us that context is a Python data type of Dictionary and gives us the info we need to craft a template to obtain the values within.

To get the user_id from this event, such as for the purpose of using as an Automation Template Condition in my scenario, it looks like this:

{{ trigger.event.context["user_id"] == "c784646142069412930c070176c9b19c" }}

You can obtain your desired comparison user_id by navigating to Settings → People → Users, then clicking on the desired username.

1 post - 1 participant

Read full topic

I need some help with my script (noob warning)

$
0
0

i have a script that handles how my alexa speakers makes announcements.
i call the script from my automations and can supply variables to the script so it knows which alexa device to play the notification and sets the speaker volume for the notification.

in my automation i call the service to run the script like so:

service: script.alexa_announce_gate_left_open
data:
  speaker_device: media_player.echo_show
  speaker_service: notify.alexa_media
  announce_volume: 0.4

i’m trying to improve the script further by adding a room occupancy variable so that the announcement plays if someone is in that room. if there was nobody it waits until someone enters the room unless the alarm was already cleared.

so i added a condition in the script that checks the state of the particular speaker’s room occupancy boolean.
the script works fine if I use the actual boolean name ie input_boolean.room_occupancy_study, but I need that to be ‘{{ speaker_room }}’. However I get the error Message malformed: Entity {{ speaker_room }} is neither a valid entity ID nor a valid UUID for dictionary value @ data[‘sequence’][1][‘if’][0][‘entity_id’]

for a start i was going to have speaker_room as another data variable that the automation passes to the script, but i eventually want to make it more advanced by deriving the correct speaker_room value based on the speaker that is being called. maybe that could be done using a bunch of if/else statements? i haven’t figured out that part yet. i’m taking baby steps.

i’m really not programmer so whatever i’ve done is from googling and copy-pasting. but i’m quite happy with what i could achieve.

here’s the script that i’ve come up with. any pointers would be very much appreciated!

alias: Alexa Announce Gate Left Open
sequence:
  - variables:
      gate_open_msg: Someone didn't close the gate
      old_volume: '{{ state_attr(speaker_device,''volume_level'') | float }}'
  - if:
      - condition: state
        entity_id: '{{ speaker_room }}'
        state: 'on'
    then:
      - service: media_player.volume_set
        data:
          volume_level: '{{ announce_volume }}'
        target:
          entity_id: '{{ speaker_device }}'
      - service: '{{ speaker_service }}'
        data:
          data:
            type: tts
          message: '{{ gate_open_msg }}'
          target: '{{ speaker_device }}'
      - service: media_player.volume_set
        data:
          volume_level: '{{ old_volume }}'
        target:
          entity_id: '{{ speaker_device }}'
    else:
      - wait_for_trigger:
          - platform: state
            entity_id:
              - '{{ speaker_room }}'
            to: 'on'
      - condition: state
        entity_id: binary_sensor.zone_gate_open
        state: 'on'
      - service: media_player.volume_set
        data:
          volume_level: '{{ announce_volume }}'
        target:
          entity_id: '{{ speaker_device }}'
      - service: '{{ speaker_service }}'
        data:
          data:
            type: tts
          message: '{{ gate_open_msg }}'
          target: '{{ speaker_device }}'
      - service: media_player.volume_set
        data:
          volume_level: '{{ old_volume }}'
        target:
          entity_id: '{{ speaker_device }}'
mode: parallel
max: 5

1 post - 1 participant

Read full topic

HA 2022.5: if then else

Google Assistent

$
0
0

is it possible to make google assistent speakers ask fx. “do you want light on” and then I can ask Yes and the light turn on

?

1 post - 1 participant

Read full topic

How to add the Aqara M1S Gateway to HomeAssistant?

$
0
0

Hello,

i tried to add the Aqara M1s Gateway to Homeassistant, but this dont work, he doenst find the Gateway, even when i give him the IP.

Can me someone say what i must do to get it to work?

1 post - 1 participant

Read full topic

Viewing all 105801 articles
Browse latest View live


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