home-assistant / frontend

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

Entity Card visibility logic not working #22646

Open Greeve99 opened 2 days ago

Greeve99 commented 2 days ago

Checklist

Describe the issue you are experiencing

Visibility logic should display Card when entity stare = Ready. the entry box shows the current state is Ready but the test fails.

chrome_7iaTpVJZdi

Describe the behavior you expected

When entity State = "Ready" ( the visual Editor shows the current state: Ready) visibility test should pass and the card should display.

Steps to reproduce the issue

Edit the Card and enter the code below or configure via visual editor

visibility:
  - condition: state
    entity: sensor.013070425748000829_bsh_common_status_operationstate
    state: Ready

chrome_7iaTpVJZdi

What version of Home Assistant Core has the issue?

2024.10.4

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

No response

Which operating system are you using to run this browser?

Windows 10

State of relevant entities

BSH.Common.EnumType.OperationState.Ready

Problem-relevant frontend configuration

visibility:
  - condition: state
    entity: sensor.013070425748000829_bsh_common_status_operationstate
    state: Ready

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

karwosts commented 2 days ago

Can you check what is the state in developer tools? is it Ready or ready ?

Greeve99 commented 2 days ago

This is what it shows in developer tools for state:- BSH.Common.EnumType.OperationState.Ready

chrome_PRaCqL9jVm

ildar170975 commented 2 days ago

The state’s value is not “Ready”… (unrelated) also a strange device_class is shown.

karwosts commented 2 days ago

You'll need to enter the entire BSH.Common.EnumType.OperationState.Ready into the state box for that to pass the condition.

Displaying the current value there as a translated state instead of the raw state is pretty confusing, but I'm not sure what's the better alternative...