mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 05:47:20 +00:00
Add guard logic from PR home-assistant#12181 to input select row (#12703)
This commit is contained in:
parent
6f67da09c0
commit
dd3a3ec586
@ -92,9 +92,14 @@ class HuiInputSelectEntityRow extends LitElement implements LovelaceRow {
|
||||
`;
|
||||
|
||||
private _selectedChanged(ev): void {
|
||||
const stateObj = this.hass!.states[this._config!.entity];
|
||||
const stateObj = this.hass!.states[
|
||||
this._config!.entity
|
||||
] as InputSelectEntity;
|
||||
const option = ev.target.value;
|
||||
if (option === stateObj.state) {
|
||||
if (
|
||||
option === stateObj.state ||
|
||||
!stateObj.attributes.options.includes(option)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user