#Set the entity using an input_select

1 messages · Page 1 of 1 (latest)

trail shard
#

What is the best way to setup same WebRTC to show a dynamically created entity? Currently I'm trying this but haven't found the solution that works yet.

type: custom:webrtc-camera
entity: {{ states('input_select.selected_camera') }}

I can type the value directly and it works but with the above I get Camera not found

deft shell
trail shard
#

Definitely an option, really thought there was a way to set entity dynamically, am I mistaken? I thought I did that in a template somewhere.

deft shell
#

i dont think you can set a cards entity dynamically like that

#

in the documentation it does seem to imply you can set multiple streams and it has a way to switch

trail shard
#

Nice, thanks for the help I'll read up and holler back if any questions.

deft shell
#

not sure how it would work with entities. you might need to put the streams in directly. worth a look at though

trail shard
#

not a big deal I do have all the stream info, just extra. As long as it's one card though I don't mind.

cunning sable
trail shard
#

that's likely what I remember then. the multiple streams works on the card just don't know how to set one active or not 😛

deft shell
trail shard
#

your first solution sounded best, well slightly modified. I just used 7 conditional cards.

#

then I can just match the text from my input_select to conditional state

#

show the appropriate card and viola same result and it's static number so not a big deal

deft shell
trail shard
#

That's nifty too.

deft shell
#

the inputselect method has the benifit of being able to automate the change though. e.g. if doorbell pressed switch to front camera

#

probably best to try a few things and see how you get on

trail shard
#

wife wants to be able to click a camera (touchscreen) to make it the live view

#

so wife wants wife gets if I can do it lol

deft shell
#

gotcha

trail shard
#

so clicking sets the input_select which will then conditionally show the right webrtc card