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

Unable to play Spotify tracks in Media

$
0
0

I can see my Spotify account in media, but if I try and play tracks I get:

Failed to call service media_player/media_play. No active playback device found.

This happens on my laptop and also iOS device. Any ideas please?

1 post - 1 participant

Read full topic


Sunrise, Sunset

Home assistant as photo frame with feed

$
0
0

After moving houses, I am ready to get back to Home Assistant after a few years apart! So, I might have missed the latest developments.

My end goal is to make a photo frame I can cast to a wall-mounted TV, with random photos in the background, and show a feed of cards with various information depending on current states, as well as a clock and weather status.

For picking out and serving photos, I hacked together a small webserver in Python, so that seems like the easy part.

What is more confusing to me, is how to best utilize Lovelace to conditionally show a list of cards overlaid on the photo. It seems like picture-elements is a good start, but I can’t add a vertical stack to it. Am I on the wrong path here? Any alternative suggestions?

Here is an illustration of what I want to achieve:

1 post - 1 participant

Read full topic

Google Speaker Group Volume Control in Script/Automations

$
0
0

Hey. I’m stumped. I gone through:

HowTo: Control Group Volume on Google Home / Nest Speakers (SONOS patent lawsuit)

and

Google Cast Integration - Removing Speaker Group Volume Controls?!? Jan 2022

but have not been able to solve this… I’m hoping people smarter than I have some ideas.

I have a script that runs spotcast to play sleep playlist in my daughters room. They have 3 Google speakers that were/ are in a group. I know Google killed the group volume control and that has messed everything up.

But this is where I have hope/ am confused.

  1. While my script no longer sets volume for media_player.girls_room the lovelace entity card’s volume control still works.

  2. When I play through spotcast to a group (so they are all in sync), individually adjusting each devices volume through a script or automation also doesn’t seem to work?

sleep_sounds:
  alias: Plays the Rain Playlist
  sequence:
  - service: spotcast.start
    data:
      entity_id: media_player.girls_room
      uri: spotify:playlist:###########
      random_song: true
      shuffle: true
  - delay:
      seconds: 20
  - service: media_player.volume_set
    target:
      entity_id: media_player.girl1_hub
    data:
      volume_level: 0.6
  - service: media_player.volume_set
    target:
      entity_id: 
        - media_player.girls_bedroom_wifi
        - media_player.girl2_hub
    data:
      volume_level: 0.4

Nothing happens here. no speaker change… it doesn’t even seem to try.

If I change the volume_set back to the speaker group the hubs display the volume, but do not change it. Again, I can go to the lovelace card and adjust the slider to change the speaker group as a whole.

Ideally, I’d prefer to individually adjust the speakers volume as one daughter likes it louder than the other, but would be happy with a way to adjust the overall volume of the group.

The same thing happens when I try and remove the volume change from the script and move it to an automation that calls the script. Any Idea’s?

1 post - 1 participant

Read full topic

Printer Low Ink Notification Help

$
0
0

I am getting an error with the message portion of the code. Not sure if my formatting is not correct or what.

alias: Ink Alert
description: ''
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.hp_envy_5660_series_tri_color_ink
      - sensor.hp_envy_5660_series_black_ink
    below: '20'
condition:
action:
  - service: notify.mobile_app_jeremys_iphone
    message: "{{ trigger.to_state.attributes.friendly_name }} is at {{ trigger.to_state.state }}"
mode: single
ERROR = Message malformed: extra keys not allowed @ data['action'][0]['message']

2 posts - 2 participants

Read full topic

2022.2 Device tracker unknow device enable

$
0
0

I have an automation that would turn on/off lights, AC, etc when someone is home. This still works fine when tracking my phone. The issue is on the guest wifi since it no longer tracks devices it does not know.

Is there a way to automatically add entities on the guest wifi like before?

1 post - 1 participant

Read full topic

Template concatenation error

$
0
0

Now I think I am doing the same, but it is not accepted. Can you shine a light on this?

service: number.set_value
data: value:"{{ states('input_number.warmtevraag') |float * 5 + 50 |int(0) }}"
target:
  entity_id: number.centrale_verwarming_temperatuur

The error I get in the trace is

Error rendering data template: TypeError: can only concatenate str (not “int”) to str

2 posts - 2 participants

Read full topic

General switch for automation

$
0
0

I welcome everyone. How to make a general switch to turn on and off several automations at the same time? In the above example, after turning on the switch, it turns itself off, although the automations remain on.

  - platform: template
    switches:
        switch_test1:
         value_template: >-
           "{{ is_state('automation.auto_test1', 'on') }} and
            {{ is_state('automation.auto_test2', 'on') }} and
            {{ is_state('automation.auto_test3', 'on') }}"
         turn_on:
          service: automation.turn_on
          data:
            entity_id: 
            - automation.auto_test1
            - automation.auto_test2
            - automation.auto_test3
         turn_off:
         - service: automation.turn_off
           data:
            entity_id:
            - automation.auto_test1
            - automation.auto_test2
            - automation.auto_test3

3 posts - 3 participants

Read full topic


Konnected : Sensors unknown after duckdns setup

$
0
0

Hi,

Wondering if anyone can help. Have a konnected alarm panel with various sensors set up. Since I managed to get external access going again the konnected panel sensors are displaying their status as “Unknown”.

Not sure why. I’ve set the override API host URL to https://[home assistant ip address]:8123 restarted home assistant, but the sensors remain unknown.

I can ping the thing so assume its on my network. I am running firmware 2.3.5. Was working fine before I finally got external access via duckdns back up and running.

Any ideas? I’d sure like to hear em.

1 post - 1 participant

Read full topic

Malformed integration not found

$
0
0

I’m pulling my hair out here trying to understand why I keep receiving the error: Message Malformed: Integration not found when trying to save this script. Full disclosure, I’m AWFUL when it comes to templates. If I copy the json into the template editor it works just fine, so what am I doing wrong?!

service: input_number.set_value
data_template:
  entity_id: >
    {% if is_state('input_select.code_slot','05') %}
    input_number.lock_code
    {% else %}
    input_number.lock_code2
    {% endif %}
  value: 0

2 posts - 2 participants

Read full topic

OrderedDict error creating automation

$
0
0

Hi

I’m getting an error when creating a blueprint automation, and I can’t figure out why?

ERROR (MainThread) [homeassistant.components.automation] Blueprint Light Color by Section of Day generated invalid automation with inputs OrderedDict([(‘target_light’, OrderedDict([(‘entity_id’, ‘light.dining’)]))]): Entity entity_id is neither a valid entity ID nor a valid UUID for dictionary value @ data[‘condition’][0][‘entity_id’]. Got None

The error appears when I go to create the automation, add a light, and then click save.

This is the automation:

blueprint:
  name: 'Light Color by Section of Day'
  description: 'test'
  domain: automation
  input: 
    target_light:
      name: Light
      selector:
        target:
          entity:
            domain: light  
            
trigger:
  - platform: time_pattern
    minutes: '1'
    
condition:
  - condition: state
    entity_id: !input target_light
    state: 'on'
    
action:
  - service: light.turn_on
    target: !input target_light
    data:
      kelvin: 5000
      brightness_pct: 10
mode: single

The new automation is saved on the automations.yaml file, but it doesn’t appear on the gui with other automations.

automations.yaml:

- id: '1644357598514'
  alias: Light Color by Section of Day -- Dining
  description: ''
  use_blueprint:
    path: perezbalen/light_color_by_section_of_day.yaml
    input:
      target_light:
        entity_id: light.dining

Running: core-2021.12.7

Thanks.

1 post - 1 participant

Read full topic

Temp Sensor not triggering Automation

$
0
0

Hello

Trying to build an automation that uses a pool temp sensor entity to trigger

Built on the Astral Connect My Pool API

can’t even get it to trigger. have tried also mapping it to entity_id: sensor.pool_status and attribute: temperature but no luck there either

- id: '1644365985041'
  alias: Pool Cold - Pump On
  description: ''
  trigger:
  - platform: numeric_state
    entity_id: sensor.pool1_temperature
    below: '31'
  condition: []
  action:
  - service: notify.notify
    data:
      message: Pool Cold Pump On
      title: Pool Cold Pump On
  mode: single

Sensor shows up on dashboard and updates every 61 seconds…is accurate to the pool
sensor config

sensor:
#
  - platform: rest
    name: Pool Status
    resource: https://www.connectmypool.com.au/api/poolstatus
    method: POST
# Change the API to match yours. You might want to put this in your secrets file.
    payload: '{ "pool_api_code": "xxxx-xxxx" }'
    force_update: true
    json_attributes:
    - pool_spa_selection
    - heat_cool_selection
    - temperature
    - active_favourite
    - heaters
    - solar_systems
    - channels
    - valves
    - lighting_zones
    value_template: 'OK'
    scan_interval: 61
    verify_ssl: false
    headers:
      User-Agent: Home Assistant
      Content-Type: application/json
###
  - platform: template
    sensors:
      pool1_pool_spa_selection:
        friendly_name: Pool - Pool Spa Selection
        value_template:   >-
          {{ ['Spa', 'Pool'][states.sensor.pool_status.attributes["pool_spa_selection"]|int] }}
      pool1_temperature:
        friendly_name: Pool - Current Temperature
        value_template: '{{ states.sensor.pool_status.attributes["temperature"] }}'
        device_class: temperature
        unit_of_measurement: '°C'
      pool1_active_favourite:
        friendly_name: Pool - Active Favourite
        value_template: '{{ states.sensor.pool_status.attributes["active_favourite"] }}'
      pool1_heaters0_mode:
        friendly_name: Pool - Heater Mode
        value_template:   >-
          {{ ['Off', 'On'][states.sensor.pool_status.attributes["heaters"][0]["mode"]|int] }}
      pool1_heaters0_settemp:
        friendly_name: Pool - Heater set temperature
        value_template:   >-
          {{ states.sensor.pool_status.attributes["heaters"][0]["set_temperature"]|int }}
        device_class: temperature
        unit_of_measurement: '°C'
      pool1_heaters0_spa_settemp:
        friendly_name: Spa - Heater set temperature
        value_template:   >-
          {{ states.sensor.pool_status.attributes["heaters"][0]["spa_set_temperature"]|int }}
        device_class: temperature
        unit_of_measurement: '°C'
      pool1_lighting_zones:
        friendly_name: Lighting Mode
        value_template:   >-
          {{ ['Off', 'Auto', 'On'][states.sensor.pool_status.attributes["lighting_zones"][0]["mode"]|int] }}
      pool1_channels4_mode:
        friendly_name: HeatPump Pump
        value_template:   >-
          {{ ['Off', 'Auto', 'On'][states.sensor.pool_status.attributes ["channels"][4]["mode"]|int] }}
      pool1_channels0_mode:
        friendly_name: Pool Circulation Pump
        value_template:   >-
          {{ ['Off', 'Auto', 'On', 'Low Speed', 'Medium Speed', 'High Speed'][states.sensor.pool_status.attributes ["channels"][0]["mode"]|int] }}
      pool1_channels5_mode:
        friendly_name: Spa Jets Mode
        value_template:   >-
          {{ ['Off', "Auto", 'On'][states.sensor.pool_status.attributes ["channels"][5]["mode"]|int] }}
#          

No associated log errors or warnings

Developer tools shows the entities correctly with the values expected and align with pool controller

1 post - 1 participant

Read full topic

Split IP Address Text

$
0
0

Hi I have a message like (192.168.2.50) I need to remove the both parenthesis with a split expression or something like that can you help me?
I use this, but I think there is a best way to do this:

message: {{ states.persistent_notification.http_login.attributes.message.split (" (") [1].replace(")","") }}

2 posts - 2 participants

Read full topic

Cannot access History

$
0
0

I am running the following:

HA OS 7.3
HA 2022.2.3 on a RPi4 with an SSD
Recorder is setup in config.yaml to read/write data from a local MySQL database

I am encountering an issue in accessing the history in the GUI. When I click on the history icon the left nav, the main screen just shows the spinning icon forever. It never stops. I believe that I did recently upgrade to HA OS 7.3 and HA 2022.2.3 and so am not sure if either of those have anything to do it, but it has worked fine the past.

In case it matters, I have no problem accessing the logbook.

Can anyone suggest what is going on and what I should do to fix it?

TIA!

1 post - 1 participant

Read full topic

Lost mqtt after 2.4

$
0
0

I use mqtt to transfer data from my weather station to HA. Works perfect. After the update to 2.4 it stopped working.

I restored the backup and all is well.

7 posts - 4 participants

Read full topic


Showing Basic RSSI - Prometheus Exporter

$
0
0

Hello HA members. I wanted to swing by and say “thank you” for the additional data now being exposed, specifically the “Basic RSSI” for Zigbee devices. I’m not sure which recent version of HA added the exposed metrics - but it’s nice to have!!

I did have to go back into each device and update the Friendly Name and Entity since the new update took the defaults rather than my edited name… but easy enough!

Thanks again!!

_DS

1 post - 1 participant

Read full topic

Alarm Clock with Sonos

$
0
0

Hey Guys,

i have set up some automations which are used for my sonos system as an alarm clock.
Pre configured sonos alarms where created in the sonos app and are enabled and disabled via home assistant.
I use a spotify playlist here with a random song and 10 minutes before the alarm lights start to fade in.

This works great but i have some problem with the ressurence of the alarm.
Most of them are only weekdays and one alarm is daily. The daily one is used for weekends.

But now i only want one (or two) alarms in the sonos app which should be enabled or disabled by a weekday/weekend switch in home assistant. I want to reduce the amount of alarms in the sonos app because there cant be two alarms with the same time which can lead to errors. Is this possible or should i go with an media.play automation instead of the pre built alarm clocks in the sonos app?

Any one had experience with this?

1 post - 1 participant

Read full topic

Use GA "ok google" trigger as a trigger for HA automations

$
0
0

Is there a way to use “ok google” as a trigger for automations?

To be clear: I don’t mean after you give GA a complete command like “ok google do xyz”. I mean directly after “ok google” has been detected and GA is actively listening for the rest of your command

So it would look something something like this in order of execution:
“ok google” {HA AUTOMATION TRIGGERS HERE} “do xyz”

2 posts - 2 participants

Read full topic

Device automation + entities

$
0
0

I used MQTT Device Trigger guide to create a new device:

Now I want to add some entities to this device, but I can’t figure out how.

I followed the guide on MQTT discovery, and used the device id from the previous guide. The entities are added but are not lined to the device. I tried something like:

discovery_topic: 'homeassistant/binary_sensor/0x90fd9ffffedf1266/config'
discovery_payload: {'name':'door','device_class':'door','state_topic':state_topic}

I am just trying to apply some basic logic so not sure if this is the right way?

Thanks.

1 post - 1 participant

Read full topic

Zemismart Blind motor - up button gray out tuya

$
0
0

hey Guys,
work with tuya lan, the window works fine for Closing and opening.
but the Blind motor how only the Closing button and the opening is grayed out.

image

1 post - 1 participant

Read full topic

Viewing all 105808 articles
Browse latest View live


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