mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 02:38:53 +00:00
UI-2015
This commit is contained in:
9
src/util/can-toggle.js
Normal file
9
src/util/can-toggle.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import {
|
||||
reactor,
|
||||
serviceGetters
|
||||
} from '../util/home-assistant-js-instance';
|
||||
|
||||
// Return boolean if entity can be toggled.
|
||||
export default function canToggle(entityId) {
|
||||
return reactor.evaluate(serviceGetters.canToggleEntity(entityId));
|
||||
}
|
||||
Reference in New Issue
Block a user