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

RESTful: is it possible to suppress failures from being logged?

$
0
0

Hi there - newby alert here…

I’ve added a few RESTful sensors to my setup. Unfortunately the service(s) queried often fail to respond. They are somewhat expected to fail, because the service isn’t always available. Unfortunately those failures leave a lot of noise in the server’s log file. Is there any way to avoid these entries?

3 posts - 3 participants

Read full topic


Tuya Zigbee Switch Module - TS0011

$
0
0

I have the TS0011 Tuya switch working with Zigbee2MQTT and it works well.

I am trying to control a smart light but I cannot find any decoupled mode or something similar that keeps the power alive to the bulb but will report the on/off status of the switch so I can automate the bulb toggle.

I want to retain the smart features of the bulb, such as dimming and colour changes which is why i want to use both, as well as turn the bulb on / off via the existing wall switch.

This video describes the problem and the solution.

Using smart light switches with smart bulbs?

1 post - 1 participant

Read full topic

How can I create a card like this?

$
0
0

I would like to create a card like this to control my shutters:
new_layout

Which would be the best layout to create a card like this? Will I need a plugin or a custom extension for that?

1 post - 1 participant

Read full topic

How to call the media browser pop-up?

$
0
0

Hi, it’s posible to call the media browser pop-up from a custom button card without installing browser-mod? i would like to add it to my custom media player card.

Thanks in advance

Captura de pantalla 2024-07-10 105425

1 post - 1 participant

Read full topic

Automation template vs DevTools Template

$
0
0

Looking for some help - I can’t seem to make the leap here to get this working.

I’m using GCal to set rgb colours on certain days of the year (green for St Patrick’s day, orange for halloween etc etc). Automation regularly checks the calendar and populates the agenda var.

I loop over the agenda, looking for a summary match (“BloomColour”) and if it exists I want to extract the message data that should contain the rgb code (0,255,0). When the BloomColour event isn’t present, I want to set the colour back to an empty string.

If I run the calendar.get_events in devtools/services, copy the output yaml → json and then post it into the Template editor with the appropriate name, the following for-loop works fine - I can see the {{target_colour}} value being printed out.

{%- for key, value in agenda.items() %}
	{%- for event in value.events if 'BloomColour' in event.summary %}
  		{%- set target_colour = event.message %}
	{%- endfor %}
{%- endfor %}
{{ target_colour }}

When I run the full automation, the value doesn’t change from an empty string.

....
  action:
    - service: calendar.get_events
      target:
        entity_id: calendar.homeassistant
      data:
        duration:
          hours: 24
      response_variable: agenda
    - variables:
        target_colour: ''
    - if:
      - condition: template
        value_template: |-
          {%- for key, value in agenda.items() %}
            {%- for event in value.events if 'BloomColour' in event.summary %}
              {%- set target_colour = event.message %}
              {{ 'true' }}
            {%- endfor %}
          {%- endfor %}

      then:
        - service: notify.slack_notification
          data:
            message: "{{ target_colour }}"
            target: debug
        - service: input_text.set_value
          data:
            value: "{{ target_colour }}"
          target:
            entity_id: input_text.colour_to_use
        - service: input_boolean.turn_on
          target:
            entity_id: input_boolean.special_alarm

      else:
        - service: input_text.set_value
          data:
            value: ""
          target:
            entity_id: input_text.colour_to_use
        - service: input_boolean.turn_off
          target:
            entity_id: input_boolean.special_alarm

I’ve tried using:

        - service: input_text.set_value
          data:
            value_template: |
              {{ target_colour }}
          target:
            entity_id: input_text.colour_to_use

but this just throws errors (“Error: extra keys not allowed @ data[‘value_template’]”).

Traces tells me it’s hitting the right path in the if-then-else statement, it’s just not populating.

Can someone explain why the {{target_colour}} input_text not updating in the automation? Pretty sure it’s simple, I’m just too close to see it.

A final question, is there a more elegant way to make the true/false work in the if-then-else rather than manually putting {{‘true’}} in the template block? I’m sure there is, but my brain is a bit fried over this.

3 posts - 2 participants

Read full topic

Repeat TTS not entirely working on Android

$
0
0

Hey all,

I’m trying to set up a repeated TTS message on my phone. The trigger for now is a dummy light switch, and it should keep repeating until the dummy is turned off. I also set up a textual notification for debugging puropses. I use the repeat statement, and eventhough is working properly (both while and exit messages are being sent), the repeated TTS isn’t sounding. The while-exit TTS action is sounding. What am I doing wrong?

alias: dummy tts
description: ""
trigger:
  - platform: device
    type: turned_on
    device_id: 751e3dd881a737b88c8762b83270371e
    entity_id: f162ab33b5a85e1332ee086ab1bdb407
    domain: light
condition: []
action:
  - repeat:
      while:
        - condition: state
          entity_id: light.dummy
          state: "on"
      sequence:
        - service: notify.mobile_app_pixel_6_pro
          data:
            message: on
            data:
              tts_text: you're a dummy
              media_stream: alarm_stream_max
              channel: alarmchannel
        - delay:
            hours: 0
            minutes: 0
            seconds: 10
            milliseconds: 0
  - service: notify.mobile_app_pixel_6_pro
    data:
      message: off
      data:
        tts_text: you've stopped being a dummy
        media_stream: alarm_stream_max
        channel: alarmchannel

1 post - 1 participant

Read full topic

Creating Multiple Device Information Views from a Single View Template

$
0
0

I have an issue that I need help with.

I want to use a view of an information page about a device and create many other similar pages using data from different devices. While it’s possible to simply duplicate the view, the number of views I want to create is quite large. Additionally, if I want to add new values to my page, I would have to recreate everything from scratch, which would be very time-consuming.

Does anyone have any suggestions or solutions for this?

1 post - 1 participant

Read full topic

Combine two entities in a card

$
0
0

Hey all,

I am a bit stumped here. I have bought some new light switches (Aqara H1). I wanted them to function as switches, but have hit a snag.

In a mushroom card, or slmilar, I want to show the info from a light bulb but have the action for toggling on and off the switch. That way the switch acts like a real switch, but if it is off I can turn it on and show the state of the bulb (colour, brightness etc) in a card.

I have tried a mushroom card showing the bulb and the action to call a service to toggle the switch but I get an error 'Failed to call service, must contain at least one of entity id, device id etc.

Anyone know of a way to combine info from one device and call a sevice of a different device?

I have put the code below and tried a few different ways, but I always get the error.

type: custom:slider-button-card
entity: light.granny_room_main
slider:
  direction: left-right
  background: gradient
  use_state_color: true
  use_percentage_bg_opacity: false
  show_track: false
  toggle_on_click: false
  force_square: false
  show_attribute: false
show_name: true
show_state: true
compact: false
icon:
  show: true
  use_state_color: true
  tap_action:
    action: call-service
    service: light.toggle
    target:
      entity_id: light.office_main
    data: {}
  icon: ''
action_button:
  mode: custom
  icon: mdi:power
  show: true
  show_spinner: true
  tap_action:
    action: call-service
    service: switch.toggle
    target:
      entity_id: switch.zmpbdw_granny_left
    data: {}

1 post - 1 participant

Read full topic


Cover improvement

$
0
0

I have just installed a roller shutter controller, and I was surprised that Home Assistant does not allow me to calibrate the opening of the roller shutters correctly in intermediate positions.
I think it would be a great help for users to be able to calibrate the intermediate positions with a list of values. For example, when I want 50% real opening, the blind should be set to 72% in the integration.
It would also improve the usability a lot to be able to easily add buttons with those presents without having to do the programming by hand, in the same integration, as for example Shutter Row Card allows.
I hope you find these ideas interesting.
Thank you very much for your continuous work.

1 post - 1 participant

Read full topic

Hello, does anyone know how to integrate VTA+ devices from Colombia, thank you

$
0
0

The devices are recognized by Tuya but I think HA should have integration with the VTA+ brand app, thank you

3 posts - 2 participants

Read full topic

Right to left slider direction on tile card with cover feature?

$
0
0

Anyone know if it’s possible to flip the slide direction of the tile card cover position slider? Maybe it’s stupid but we feel like it would be more intuitive to pull the blinds sliders from right to left.

I know some sliders have a direction attribute, but this one doesn’t seem to have it.

1 post - 1 participant

Read full topic

Control of z-vawe devices via mqtt

$
0
0

Hi all.

What am I missing and what am I doing wrong?

I switched z-wave network management from the Z-WaveMe add-on to the Z-Wave JS UI add-on.
I have external control connected via an external mqtt server.
All topics are visible, I can see device statuses, but I can’t control the devices.

For example:

Light_in_the_bathroom
37
   1
     currentValue = false
     targetValue = false
   2
     currentValue = false
     targetValue = false
lastActive = 1720599406480
status = true

If I switch the device to HA, the server will publish the information to the topic and I will see the changes.

Light_in_the_bathroom
37
   1
     currentValue = true
     targetValue = true
   2
     currentValue = false
     targetValue = false
lastActive = 1720599406480
status = true

But if I publish information to a topic from the mqtt server, then nothing happens, only a change in the topic on the mqttt-server is visible.

In the Z-WaveMe add-on, it was possible to publish the parameter in a publiср thread and everything worked.

4 posts - 4 participants

Read full topic

Moes smart switch - router interference

$
0
0

Hey!

I am just starting out building my Zigbee network.

I have one Moes Smart Socket that is plugged in the hallway and connects to my Sonoff coordinator. Now, after I purchased Moes Light Switch and connected it to HA via Moes Smart Socket, the state of Light Switch would often go out of sync, or it would turn on/off on its own.

At first, I thought it was due to interference caused by serial connection of multiple lights on the same circuit (there are two live wires that go into the switch). But, after re-connecting directly to coordinator (that is further away), all the problems went away.

Other devices connected via this Smart Switch do not have any issues with running, that is Aqara Curtain Driver and other Light Switch, but this one is on a dedicated circuit.

I am quite curious as to what is going on here and I am pretty sure that the answer to this will be obvious to you! Appreciate any pointers!

Thanks

1 post - 1 participant

Read full topic

Please help with a shell script to save a file locally

$
0
0

I’m trying to create a script that’ll save something to a file. I’m banging my head against the wall here, I tried this in a million different variations and I can’t understand why this is not working.

In configuration.yaml I have:

shell_command:
    save_pdf: echo "{{pdf_data}}" | base64 -d > /config/www/temp/{{file_name}}

In developer mode I try:

service: shell_command.save_pdf
data:
  pdf_data: JVBERi0xLjcKJcfs
  file_name: document5.pdf

The file isn’t being created. This must be such a stupid mistake, what am I doing wrong here?

Thanks!

2 posts - 2 participants

Read full topic

Trigger automation from Script with variable automation name

$
0
0

I followed a few guides here to get Persistent notification with buttons for delay on my phone.
I’m running into a weird issue that I’m not sure is syntax, or just impossible to do with the scripts.
I have a thermostat running in my garage, i want it to notify (persistent) with buttons for turn off, delay 20min, All ok, when the compressor has been running over 20 minutes.
I have a working solution with a dedicated script. but would like the script to be automation agnostic, in case I call it from a different automation. Currently I can only get it to work if I call the “automation.trigger” with hardcoded entity_id.
Any time I do the same, but with the entity_id variable, the script fails.

EDIT: I was an idiot and didn’t test the entire script. just selected “run” on the automation.trigger service in gui, which succeeded.
When running the entire script, even the hardcoded automation.trigger does not succeed…

My automation is this:

alias: GarageThermostatTest
description: ""
trigger:
  - platform: device
    type: turned_on
    device_id: 7a315795d9c9edb21c23001289cc62cf
    entity_id: 947a731813fbc75a590dfb2f159bf729
    domain: switch
    for:
      hours: 0
      minutes: 20
      seconds: 0
condition: []
action:
  - service: notify.mobile_app_rusty_phone
    metadata: {}
    data:
      title: Thermostat Notification
      message: Garage AC on more than 20 Minutes
      data:
        actions:
          - action: TURNOFF
            title: Turn AC OFF
          - action: SNOOZE_20_MIN
            title: Ignore 20 Min
          - action: IGNORE
            title: All OK
        persistent: true
        tag: garageTherm
  - wait_for_trigger:
      - platform: event
        event_type: mobile_app_notification_action
        event_data:
          action: TURNOFF
      - platform: event
        event_type: mobile_app_notification_action
        event_data:
          action: SNOOZE_20_MIN
      - platform: event
        event_type: mobile_app_notification_action
        event_data:
          action: IGNORE
    continue_on_timeout: true
    timeout: "0:05"
  - choose:
      - conditions:
          - condition: template
            value_template: "{{wait.trigger.event.data.action == \"TURNOFF\"}}"
            enabled: true
        sequence:
          - service: climate.set_hvac_mode
            metadata: {}
            data:
              hvac_mode: "off"
            target:
              area_id: garage
          - service: notify.mobile_app_rusty_phone
            data:
              message: clear_notification
              data:
                tag: garageTherm
      - conditions:
          - condition: template
            value_template: "{{wait.remaining == 0}}"
            enabled: true
        sequence:
          - service: climate.set_hvac_mode
            metadata: {}
            data:
              hvac_mode: "off"
            target:
              area_id: garage
          - service: notify.mobile_app_rusty_phone
            data:
              message: clear_notification
              data:
                tag: garageTherm
      - conditions:
          - condition: template
            value_template: "{{wait.trigger.event.data.action == \"SNOOZE_20_MIN\"}}"
            enabled: true
        sequence:
          - service: script.snooze_notifications_retrigger
            data:
              snooze_time_mins: 20
              automation_name: automation.garagethermostattest
      - conditions:
          - condition: template
            value_template: "{{ wait.trigger.event.data.action == \"IGNORE\"}}"
            enabled: true
        sequence:
          - service: notify.mobile_app_rusty_phone
            data:
              message: clear_notification
              data:
                tag: garageTherm
mode: restart

My Script is this: (this one fails and doesn’t retrigger the automation, but does re-enable it)

alias: Snooze Notifications Retrigger
sequence:
  - service: automation.turn_off
    target:
      entity_id: "{{ automation_name }}"
    data:
      stop_actions: false
  - delay:
      minutes: "{{ snooze_time_mins }}"
  - service: automation.turn_on
    target:
      entity_id: "{{ automation_name }}"
  - delay:
      seconds: 1
  - service: automation.trigger
    metadata: {}
    data:
      skip_condition: true
    target:
      entity_id: "{{ automation_name }}"
mode: single
description: snooze Notifications, then fire again after snooze

This one succeeds, but is obviously not automation agnostic.

alias: Snooze Notifications Retrigger
sequence:
  - service: automation.turn_off
    target:
      entity_id: "{{ automation_name }}"
    data:
      stop_actions: false
  - delay:
      minutes: "{{ snooze_time_mins }}"
  - service: automation.turn_on
    target:
      entity_id: "{{ automation_name }}"
  - delay:
      seconds: 1
  - service: automation.trigger
    metadata: {}
    data:
      skip_condition: true
    target:
      entity_id: automation.garagethermostattest
mode: single
description: snooze Notifications, then fire again after snooze

So the real hangup is, Why does the automation.turn_on succeed with variable as entity_id, While the automation.trigger fails… (unless somehow I’ve got bad syntax. which is very possible) (See edit before code)

1 post - 1 participant

Read full topic


Unable to re add matter devices to HA after factory resetting

$
0
0

Last week I bought two Linkid wifi compatible matter bulbs ( this items), followed the instructions and everything worked perfectly. This Monday a child inadvertently turned the light off and on 5 times, and did a factory reset of the bulbs.

Now I’m trying to re-integrate them the same way I did and I can’t, the app always gets stuck in the “Cannot access Google. Check your internet connection and try again”.

The bulbs are indeed accessible via bluetooth, as I have tried configuring them via wifi with the app (Aidot) and I can control them from there, however I would love to be able to have them on my HA dashboard.

Would anyone know what could be going on?

Log from matter server: (click for more details) Matter integration debug log: (click for more details) HA version: (click for more details)

1 post - 1 participant

Read full topic

BroadLink RM4 Mini teaching problem

$
0
0

I’m trying to follow the JuanM video on setting up my unit. I’m running into a problem where I create a list of commands and try to teach them via my existing remote. When I run the service, instead of prompting
me for Volume Up then Volume Down, I get this prompt in notifications.

Learn command
Press the ‘Volume Up Volume Down’ button.

What am I doing wrong?

1 post - 1 participant

Read full topic

How to get HA to work across VLANs?

$
0
0

I have two VLANs in my house:

  • VLAN1 - 192.168.129.0/24
  • VLAN2 - 10.0.0.0/24

HA currently resides on the 10.0.0.0/24 VLAN, along with many of my other IoT devices. I have some Sonos speakers on the 192.168.x.x network that I would like HA to interact with, however I can’t figure out how to get this working.

Right now I have the firewall totally open between both VLANs and can ping devices from both sides, however HA is still not able to discover the Sonos speakers.

Is there a way to add a second interface IP for HA to put it on the 192.168.x.x subnet, or how else can I get HA to discover devices on this other VLAN?

I’m still a bit of a noob when it comes to HA, so any and all advice is appreciated.

4 posts - 3 participants

Read full topic

M5Stack atom help please

$
0
0

Today I had delivered a M5Stack Atom. The box was marked ESP FW pre-installed for Home Assistant. I’ve gone through the whole install process and everything appears to be working fine - the device itself, ESP, Whisper, pipeline, openwakeword etc. I had one problem in the early stages which was as I don’t use Chrome for my browser it closed the active window when doing the ESP install which meant I had to do the ESP Home Connection settings manually (using IP address atm, until I work out the right way) - but I don’t believe that is relevant.

As per the install process I tried OK Nabu but nothing happened. Pressing the button does nothing either. I was expecting the LED to go blue. HA sees the button entity is pressed so it seems to be properly connected.

I’m on the latest HA releases.

I’m hesitant to factory reset until I’ve aired the problem here to see if anyone has a better idea!

Thanks in advance.

6 posts - 3 participants

Read full topic

Log to logbook on event

Viewing all 106611 articles
Browse latest View live


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