home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.13k stars 2.81k forks source link

no devices/entities dropdown shown on automations #23071

Open fjleon1980 opened 12 hours ago

fjleon1980 commented 12 hours ago

Checklist

Describe the issue you are experiencing

i am creating an automation that uses "Conditionally execute an action" if-else. When selecting the Targets option and when clicking on either entities or devices, i just get "no matching devices (or entities) found" and if i start typing the name i don't see any devices showing up.

however, if i type the actual full correct device / entity name and press enter then it selects it correctly. But the automation never triggers properly. To workaround the issue, I had to create two automations, one to turn on the light and one to turn off. These aren't using

I was on 2024.7 and i just updated to 2024.11.3 and same issue. using docker version

Describe the behavior you expected

When clicking on the entities list it should populate with all the entities and typing the name of each should allow for auto complete

Steps to reproduce the issue

  1. Create automation
  2. Create two triggers. One using time at 7pm, the other using time at 6 am. Assign a trigger ID for both
  3. Add an action "Conditionally execute an action" and select "triggered by" and choose any of the two id's that will shown.
  4. Choose the "then" as "Perform action: turn off on .
  5. On the Targets option, click on either devices or entities. You will get "no matching " found
  6. Type switch.porch (my entity name) and press enter. It will recognize the name
  7. However, if you create the automation it won't run

These steps were followed from this video https://www.youtube.com/watch?v=qbj8vi_bweQ

What version of Home Assistant Core has the issue?

2024.11.3

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Edge 131, also reproduced on Firefox 132

Which operating system are you using to run this browser?

Windows 11 23H2

State of relevant entities

n/a

Problem-relevant frontend configuration

n/a

Javascript errors shown in your browser console/inspector

none

Additional information

image

fjleon1980 commented 12 hours ago

this is the YAML that doesn't even run after being created

alias: Turn on and off porch light
description: ""
mode: single
triggers:
  - at: "19:00:00"
    id: on7pm
    trigger: time
  - at: "06:00:00"
    id: off6am
    trigger: time
conditions: []
actions:
  - if:
      - condition: trigger
        id:
          - on7pm
    then:
      - target:
          entity_id: switch.porch
        data: {}
        action: light.turn_on
  - if:
      - condition: trigger
        id:
          - off6am
    then:
      - target:
          entity_id: switch.porch
        data: {}
        action: light.turn_off

for comparison, this automation (single turn off action) does work:

alias: Turn off porch
description: ""
triggers:
  - trigger: time
    at: "06:00:00"
conditions: []
actions:
  - type: turn_off
    device_id: <long id goes here>
    entity_id: <another long id goes here>
    domain: switch
mode: single
karwosts commented 12 hours ago

You cannot call light.turn_off on a switch entity.

You need to use switch.turn_off.

The domain of the action needs to match the domain of the entity.

fjleon1980 commented 11 hours ago

thank you, i have changed it (followed the video straight and didn't think switch and light would be incompatible). sorry, i would have likely figured this out if not for the following:

1) why does the device list populate correctly with everything that i have in the house (which is mostly not switches) when i switch the action to switch.turn off?

2) The UI should not accept me typing switch.porch if I have the action set to light. ideally it should show an error