Native support for select entities
See original GitHub issueIs your feature request related to a problem? Please describe. I like to have control over the night vision mode of my Tuya camera. Fortunately, the Tuya integration provides a Select entity with the options Automatic, On and Off.
I wanted to include a menu button in the Frigate card that would allow me to switch between these options.
Describe the solution you’d like Something like below:
- type: custom:frigate-card-menu-select
conditions:
view:
- live
camera:
- camera.rua
entity: select.camera_da_rua_night_vision
That could auto-color the icon based on entity’s icon and auto-mark the selected option as selected. And, of course, auto-render a submenu based on the available options.
Describe alternatives you’ve considered The following, but I haven’t figured out yet how could I mark the selected option as selected based on the entity state.
- type: custom:frigate-card-menu-submenu
icon: mdi:theme-light-dark
conditions:
view:
- live
camera:
- camera.rua
items:
- title: Automatic
icon: mdi:theme-light-dark
tap_action:
action: call-service
service: select.select_option
service_data:
entity_id: select.camera_da_rua_night_vision
option: '0'
- title: Off
icon: mdi:weather-sunny
tap_action:
action: call-service
service: select.select_option
service_data:
entity_id: select.camera_da_rua_night_vision
option: '1'
- title: On
icon: mdi:weather-night
tap_action:
action: call-service
service: select.select_option
service_data:
entity_id: select.camera_da_rua_night_vision
option: '2'
Additional context None.
Issue Analytics
- State:
- Created a year ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
How to call native SQL queries with JPA & Hibernate
In this article, I will show you how to use native SQL queries, different options to map the query result to DTOs and...
Read more >Querying JPA Entities with JPQL and Native SQL - Oracle
JPQL lets you define queries using one of the following three statements: SELECT, UPDATE, or DELETE. It's interesting to note that the EntityManager...
Read more >Native SQL Queries
Native SQL queries which query for entities that are mapped as part of an inheritance must include all properties for the base class...
Read more >Native SQL - Doctrine Object Relational Mapper (ORM)
With NativeQuery you can execute native SELECT SQL statements and map the results to Doctrine entities or any other result format supported by...
Read more >Querying in Entity Framework
Entity framework supports three types of queries: 1) LINQ-to-Entities, ... //Querying with Object Services and Entity SQL string sqlString = "SELECT VALUE ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Woohoo! Thank you for testing!
@dermotduffy amazing! It’s working like a charm:
https://user-images.githubusercontent.com/29582865/167436577-897aecfe-cd2e-4cc7-a5f9-6cd46797db1f.mp4
BTW, arbitrary Select entities can be created using Templates.
I can’t thank you enough!