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

Cannot play TTS on chromecast/Fully Kiosk browsers

$
0
0

I updated to 2022.4 recently and can no longer get TTS audio to work on Chromecast devices or other media players. I’ve tried using cloud_tts (Nabu Casa) and google_tts, neither one works. Sometimes I get the chromecast chime on the cast enabled speakers, but no audio. I used to work until a few weeks ago (but I can’t put a date on the last time I used TTS successfully in my instance). I also tried playing a local audio file with no success. I keep seeing this error in the logs:

Logger: homeassistant.core
Source: components/cast/media_player.py:659
First occurred: 9:29:47 PM (3 occurrences)
Last logged: 9:40:04 PM

    Error executing service: <ServiceCall media_player.play_media (c:2929b16e5f6858246335cc31200b20ef): device_id=['cd55b6ee17d311ebb6e59b95cec545f0'], extra=, media_type=music, media_id=http://192.168.0.199:8123/local/medicine.mp3>
    Error executing service: <ServiceCall media_player.play_media (c:3e196515605d878cba13fd65a1578da3): entity_id=['media_player.dining_room_speaker_2'], extra=, media_type=audio/mpeg, media_id=media-source://media_source/media/local/medicine.mp3>
    Error executing service: <ServiceCall media_player.play_media (c:967ebcfa5d77b14df17c25bab8150d58): entity_id=['media_player.dining_room_speaker_2'], extra=, media_type=music, media_id=http://192.168.0.199:8123/api/tts_proxy/35ee8386410d41d14b3f779fc95f4695f4851682_en_-_google_translate.mp3>

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1652, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 677, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 955, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 714, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 659, in async_play_media
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/pychromecast/quick_play.py", line 77, in quick_play
    controller.quick_play(**data)
  File "/usr/local/lib/python3.9/site-packages/pychromecast/controllers/media.py", line 506, in quick_play
    raise PyChromecastError()
pychromecast.error.PyChromecastError

Can’t really figure out what’s going on or how to fix it. The speaker itself works if I cast spotify or something else to it. I have tried it with three different smart speakers and a couple of fully kiosk tablets as well. Fails on all of them.

Thanks!

1 post - 1 participant

Read full topic


Unknown entity * shows up in entity list and logs all actions of all other entities

$
0
0

I have been wondering about an entity in my Home Assistant configuration (docker), that is simply a “*”. It seems to log all actions from all other entities in my setup.

It also shows up as an ‘Active Listener’ in the Developer Tools > Events page.
image

I guess my question is, is it supposed to be there? Or is it a side-effect of something else that I should look into more? Please ask if you need more screenshots or information - happy to provide.

2 posts - 2 participants

Read full topic

Synology Docker Sonoff Zigbee USB Setup

$
0
0

Hi,

I have HA running on a Docker in my Synology NAS and I just purchased the Sonoff Zigbee USB dongle. Unfortunately I have no idea how to get this running. It seems somehow I need to find my USB path, but I am really having problems finding out how to get it working. Has anybody else with this setup gotten it properly configured?

1 post - 1 participant

Read full topic

Automation for System error

$
0
0

Good morning,

today I tried to get this automation to work:

automation:
  - 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[0] }}'
    action:
      service: persistent_notification.create
      data:
        title: Something bad happened
        message: "{{ trigger.event.data.message }}"

This is the automation example from https://www.home-assistant.io/integrations/system_log/

The dire event is true.
If I tried to save this automation there is this error:
Message malformed: required key not provided @ data[‘action’]

Hope someone can help

1 post - 1 participant

Read full topic

Amazon bought brandless YX-WS01 Smart Plug

HomeMatic toggle to 80%

$
0
0

Hey community,

bear with me, I’m new to Home Assistant :slight_smile:

In one of my Dashboards I configured an entity to either put all my shutters to 0% or 100%.

I want to mainly use this to close all shutters when I’m leaving the house. (No, I haven’t yet used any automations with geofencing to do this alone, as there are other dependencies, hence keeping it manual currently.)

However, when closing all shutters I do not want them to go to 100%, I require them to stop at 80%. How could this be achieved?

Environment:
core-2022.4.5 as container on Synology

2 posts - 2 participants

Read full topic

MQTT Vaccum vs. Template Vaccum

$
0
0

I’m trying to build a vacuum, which base is a MQTT device. But I’m struggling with all the three options. Currently, no options fits and I hope, you can share some insights and ideas.

MQTT Legacy Configuration here

Is there any possibility to have more than one command_topic? For my mower (Husqvarna via Robonect module), start/stop are on one topic, e.g. /control, but others (back to docking station) are on a subtopic /control/mode.

Currently, this MQTT Legacy Configuration brings (as far as I see the most options and features for me, compared to the other ones below. The least flexible seems to be the new MQTT Vacuum State Configuration, which seems to require having all on source side.

MQTT Vacuum State Configuration here

How to assign battery level and charging state in this method? Same for error? As I have no dedicated state_topic. The legacy method to use different topics, etc. was/is for me much more flexible.

And same question regarding two command_topics as above in the legacy method.

Template Vacuum here

How to set charging state? Or is there only Battery level possible?

1 post - 1 participant

Read full topic

Adhoc entity requests

$
0
0

Hey HA community,

I am trying to find a way to turn off or on some devices in an adhoc fashion. Some examples of what I want to do is:

  • Turn off AC in 2 hours (so that we can turn on the AC and then go to sleep)
  • Turn off a given light entity in 5 minutes

I understand that I can create individual automation for a given entity (and I have done that in various instances) but I wanted to check if anyone here has done something similar for all entities so that I can control them via an adhoc command?

It would be great if I can use Alexa or Siri (via Homekit Integration) rather than going to Lovelace and using a Scheduler like card to setup a one-off schedule everytime.

2 posts - 2 participants

Read full topic


Maximum value lost after restart

$
0
0

Dear Community, I would like to track the maximum value of my solar system and display it as a number. Unfortunately it does not work yet because on restart my already highest value disappears and it takes the current value again. After that it works again as expected and it updates the value only with the highest value. I have already read through some threads here in the forum and added the first line. Unfortunately without success. So how to solve the restart issue? Thank you so much in advance.

- sensor:
      - name: "SolarPeakMax"
        unit_of_measurement: "W"
        state_class: "total_increasing"
        state: >
          {% if states("sensor.grid_power") in ['unknown', 'unavailable', '0', '0.0'] %}
          {% set sensorOutput = states("sensor.SolarPeakMax") %}
          {% else %}
          {% set sensorGrid = states("sensor.grid_power") | int(0)%}
          {% set sensorSolarPeakMax = states("sensor.SolarPeakMax") | int(0)%}
          {% if sensorGrid > sensorSolarPeakMax %}
          {% set sensorOutput = sensorGrid %}
          {% else %}
          {% set sensorOutput = sensorSolarPeakMax %}
          {% endif %}
          {% endif %}
          {{ sensorOutput }}

This was a restart:

1 post - 1 participant

Read full topic

Automation not close the valve after timer finished

$
0
0

Hi, need your help with my automation. The section “Run the timer” works perfectly but when the timer runs out on time, the section “timer ended” did not work and the valve did not close.

Any help would be appreciated!

timer:
  vtime2:
    duration: "00:00:00"
  
  
automation test:
  - alias: Turn on the timer
    trigger:
      - platform: state
        entity_id: switch.valve_2
        to: 'on'
    action:
      - service: timer.start
        data:
          entity_id: timer.vtime2
          duration: '00:00:10'
          
  - alias: timer finished    
    trigger:
      - platform: event
        event_type: timer.finished
        event_data:
          entity_id: timer.vtime2
    action:
      - platform: state
        entity_id: switch.valve_2
        state: 'off'

1 post - 1 participant

Read full topic

File editor 'refresh'

$
0
0

Anyone know why file editor refreshes after a timeout? It’s infuriating. I’ve lost so much work over the months/years(?) to this

thanks

2 posts - 1 participant

Read full topic

How to get second last state

$
0
0

As title, I need to get the state previous to the last one of a sensor, how can I do that?

1 post - 1 participant

Read full topic

Turn on light when motion is detected but only after sunet

$
0
0

Hi,

I wish to get some help with an automation.

I have a light that i want to turn on when motion is detected. This part works but i only want them to turn on after sunset, also only be on for like 10 minutes. And should stop when the sun is up again.

I would like to do it via GUI because i have done everything else via GUI.

I run version: 2022.4.7 on a RaspberryPi

Thanks!

1 post - 1 participant

Read full topic

How to use 'ip route' command at Home Assistant?

$
0
0

How we can execute the command ‘ip route add [ip_device] via [ip_device] dev eth0’ at Home Assistant with the SSH Terminal Add-On?

1 post - 1 participant

Read full topic

Need to turn on light twice to set color

$
0
0

LocalTuya integration with a generic Tuya bulb. I can set RGB color just fine in UI but if I call the light.turn_on service and enter color (regardless the method), it always turns on with neutral (white) light first, and only changes to the desired color on second call, with a short delay in between.

Any idea how to fix this? Nothing in log.

1 post - 1 participant

Read full topic


Dynamically Populating a Dropdown (input selector) (Solution not question)

$
0
0

Apologies if this is in the wrong place but I’ve spent the last 24 hours down a templating rabbit hole.

Basically I wanted a file selector dropdown, so I can run a script that will delete a podcast. I found many solutions/problems on the forum, and got it to work a few ways so I thought I would share as I think this is a little unclear.

My solution/components:

  • Command line sensor (python script that returns a json with a number of files and a list of files and a list of files like
  {"number": 5, "podcasts": ["NOPOD", "How_Do_You_Cope_p0c350qc.mp3", "Doomsday_Watch_with_Arthur_Snell_PMO7960405479.mp3", "Office_Ladies_3448.mp3", "Office_Ladies_8953.mp3"]}

(the NOPOD is always inserted at the front so that when I load the lovelace card clicking the delete button won’t do anything.)
The sensor looks like this

  - platform: command_line
    name: podcast_json
    command: "path/to/script/podcasts_json"
    scan_interval: 60
    json_attributes:
      - number
      - podcasts
    value_template: "{{ value_json.number }}"

My first attempt just loaded a comma seperated list, but a list of files soon exceeds 255 characters, and required a python script (which I cadged from petro on a post I can’t find) this worked OK, but the final solution is simpler.

As all the filenames are returned in a single key, you can then load that key back into the input select

Automation:

alias: 'JSON Update Podcast List '
description: ''
trigger:
 - platform: state
 entity_id: sensor.podcast_json
condition: []
action:
 - service: input_select.set_options
 data_template:
  options: |
   {{ states.sensor.podcast_json.attributes.podcasts }}
 target:
  entity_id: input_select.pod1,input_select.pod2
 mode: single

(There are 2 input selectors so I can delete 2 at a time, which is a good enough compromise over having a proper file selection dialogue.

(there are lots of examples of tryong to load options with a for loop, this doesn’t work unless you do the loop inside a json Populating Input_Select options from REST - #3 by makani47

[{%- for item in states("sensor.fpp3_playlists")|from_json %} "{{ item }}"{%
   if not loop.last %}, {% endif %} {%- endfor %}]  
)

So basically this solution I stumbled across seems simple thant than most I found. And solving this was pretty fun. Suggestions, clarifications, and improvements welcome.

1 post - 1 participant

Read full topic

Increase 1 minute in an input_datetime

$
0
0

That’s the question. First of all, sorry for the newbie question but i’m not able to find the syntax for increase this entity input_datetime.tiemposemanalcalefaccion as input.datetime in one minute inside and automation.

Something like input_datetime.tiemposemanalcalefaccion = input_datetime.tiemposemanalcalefaccion + 60 seconds.

Thanks in advance

1 post - 1 participant

Read full topic

Get toggle sitch to refresh with IKEA Fyrtur

$
0
0

I have a couple of IKEA (Tradfri) Fyrtur blinds which I have integrated with home assistant.
They work great as is, but since I have a lot of them throughout the house I wanted a toggle switch for each room.
The first method I tried was to create a an input boolean and two automations, one to roll the blinds up and one for down.
This method worked well aside from one minor issue. When I decide to use the physical hardware switch to control the blinds or roll them up any other way than to use the toggle switch, the toggle switch do not get “refreshed”, it still holds the original value (or position).
First I thought the issue arose because I used several blinds in the switch, but the same happens when I only used one blind per automation

Here’s the code for the automations:

- id: '1650963916399'
  alias: Kitchen Blinds Up
  description: ''
  trigger:
  - platform: state
    entity_id: input_boolean.kitchen_blinds
    to: 'off'
  condition: []
  action:
  - device_id: 7889543acdf0u99b5a4080b4054339ae
    domain: cover
    entity_id: cover.right_window
    type: set_position
    position: 100
  - device_id: 58ef88abefe98e9f949q90h350844179
    domain: cover
    entity_id: cover.left_window
    type: set_position
    position: 100
  - device_id: 3fe5aff7ea47fb07598ace743999f2d3
    domain: cover
    entity_id: cover.small_right_window
    type: set_position
    position: 100
  - device_id: 46d1dc647c92856ae766fe67685fbffe
    domain: cover
    entity_id: cover.small_left_window
    type: set_position
    position: 100
  mode: single
- id: '1650964403430'
  alias: Kitchen Blinds Down
  description: ''
  trigger:
  - platform: state
    entity_id: input_boolean.kitchen_blinds
    to: 'on'
  condition: []
  action:
  - device_id: 7889543acdf0u99b5a4080b4054339ae
    domain: cover
    entity_id: cover.right_window
    type: set_position
  - device_id: 58ef88abefe98e9f949q90h350844179
    domain: cover
    entity_id: cover.left_window
    type: set_position
  - device_id: 3fe5aff7ea47fb07598ace743999f2d3
    domain: cover
    entity_id: cover.small_right_window
    type: set_position
  - device_id: 46d1dc647c92856ae766fe67685fbffe
    domain: cover
    entity_id: cover.small_left_window
    type: set_position
  mode: single

And here’s the helper:

{
    "version": 1,
    "minor_version": 1,
    "key": "input_boolean",
    "data": {
        "items": [
            {
                "name": "Kitchen Blinds",
                "icon": "mdi:blinds",
                "id": "kitchen_blinds"
            }
        ]
    }
}

The second method I tried was to create a template switch.
I did this for another room with only one blind as to make things a little easier on myself.
The issue I’m having this time is whenever I click the toggle button it reverts back to “off” after a second or two.

Here’s the code for the template switch:

switch:
  - platform: template
    switches:
      office_blind:
        value_template: "{{ is_state('cover.tradfri_blind_7', 'on') }}"
        turn_on:
          service: homeassistant.toggle
          target:
            entity_id: cover.tradfri_blind_7
        turn_off:
          service: homeassistant.toggle
          target:
            entity_id: cover.tradfri_blind_7
        icon_template: >-
          {% if is_state('cover.tradfri_blind_7', 'on') %}
            mdi:blinds-open
          {% else %}
            mdi:blinds
          {% endif %}

Simply put, what I’m trying to achieve is to have a toggle switch that refresh when you interact with the blinds in any other way than the toggle switch. e.g. if I roll the blinds up one by one, ideally the toggle switch should refresh after the last one has been rolled up.
Is what I’m trying to achieve even possible and if so, which is the preferred method I should continue with?
Also, can anyone spot the error I’ve made with the template switch? Been at that one for hours and it’s starting to drive me slightly insane…

1 post - 1 participant

Read full topic

Help with an automation trigger to run an auxillary fan

$
0
0

Hi

I am trying to do something that seems really simple but it’s just not working…its an automation.

Input : when solar power being generated is more then 2000w

Then: turn on a switch (that Has a fan on it to provide extra cooling to my inverter).

Attempt 1: using the trigger of a numeric value…I put in the entity id and 2000

Nothing happens.

Attempt 2: using the threshold helper I made a helper called ‘solar’, told it to become ‘on’ when the solar energy being produced is over 2000…
I created an entity id card that definitely shows on if it is above 2000 and off if below …

However I can’t seem to get it working in automations to trigger turning on the fan.


What am I doing wrong ?

1 post - 1 participant

Read full topic

RFXCOM + Somfy right ID code

$
0
0

Can someone explain me what the right event code I need to use.
I tried several combinations without any success.

The ID is: C 1C 1C
The Unit codes is: 3
RFY command is: 0C 1A 00 20 0C 1C 1C 03 08 A5 00 05 00
idl-3 is : 0C1C1C decimal: 793628

The RFXCOM RFXtrx manuel is mentioning:

Make a note of the assigned ID and Unit Code and then add a device to the configuration with the following id 071a0000[id][unit_code]. E.g., if the id was 0a 00 01, and the unit code was 01 then the fully qualified id would be 071a00000a000101, if you set your id/code to single digit in the rfxmngr, e.g., id: 1 02 03 and unit code: 1 you will need to add 0 before, so 102031 becomes 071a000001020301

So in my case this would be?
071a0000[793628][03] 071a000079362803
Or must it be:
071a0000[0C1C1C][03] 071a00000C1C1C03

Or any other combination?
Please help don’t get it working :frowning:

This is the info from the windows RFX software:

17-3-2022 01:02:28:840= RFY command: 0C 1A 00 20 0C 1C 1C 03 08 A5 00 05 00 
================================================
Packettype    = RFY
subtype       = RFY
Sequence nbr  = 32
id1-3         = 0C1C1C decimal:793628
Unit          = 3
Command       = > 2 seconds: program
rfu1          = A5
rfu2          = 00
rfu3          = 05
Signal level  = +10 dBm
------------------------------------------------
17-3-2022 01:02:31:942= 0402012000
Packettype        = Receiver/Transmitter Message
subtype           = Transmitter Response

Sequence nbr      = 32

response          = ACK, data correct transmitted

1 post - 1 participant

Read full topic

Viewing all 99593 articles
Browse latest View live


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