I have a dropdown, which has 3 options
Office, Living Room, Kitchen.
input_select:
room_temp_display:
name: Display Room Temp Info
options:
- Office
- Living
- Kitchen
initial: Jamie
I want to âlinkâ these values, to an âaverage"sensor:
So " âAverage Temp - Living Roomââ linked to the drop down âLivingâ
and âAverage Temp - Jamie Officeâ linked to âofficeâ
is it possible to somehow link what you selected in the âinput selectâ to the entity used for the graph card.
or do i need to just copy and paste the graph code (15x) for each room in the house?
seems like a load to load up, if thats the case
trying my luck with state-switch, to display a button depending on which Lovelace dashboard I am on. Closest I could find in the current available options would be a css media rule using the media query parameter, but dont think I can create a template using
window.location.pathname
?
this would be awesome if possible:
and allow for some nifty display tricks.
Anyone can help me realize this? If not possible in the current available options, Thomas, would this be something you could and would add?
considered using the template option, but donât think the window.location.pathname is available in Jinja?
like this (and yes I know this isnât correct, but I hope it illustrates what I am after):
type: custom:state-switch
entity: template
template: "{% if window.location.pathname == '/ui-settings/time_settings' %} day {% else %} night {% endif %}"
states:
day:
type: markdown
content: Where do you want to go today?
night:
type: markdown
content: Sleep tight!
thanks for considering
edit
been able to do this in custom:button-card with below code:
found an issue, which I am not sure is a bug or a featureâŠ
showing a button-card based on the state of a binary_sensor, which is checking the state of a sensor, sensor.saver_trash_today, see the âoffâ conditioned card, being none or not. If not, (the sensor exists) it should show the button, using the sensor for entity.
If indeed none, and the binary_sensor (problem) is on, it should show a button card with a entity_picture. translates to:
Hi, can someone help me build a simple setup please?, I completely donât understand how to do it. All I need is 4 buttons at the top and each of them will open a new card with entities, lights etc. It will be nice to have some effect as well.
Sorry for the confusion. Iâm looking to display content (in my case an image element on a picture-elements card) based on the navigation_path or window.location.pathname.
not really sure what you are trying to do with the day and night here, but I donât think the window.location.pathname is available to jinja templates (which is serverside backend). It is used in the javascript templates, and really a browser side frontend thing.
Unless state-switch has access to the path in one way or another, this wont go. You might be able to try the #hash option:
Sir, thank you so much for sharing this. It worked for me.
Sir i have one requirement.
Whenever a switch or light is turned on or off, i need to inform the owner on his iphone.
I was wondering when an entity shows up/or leaves this conditional card, how can i use the state and entity name to be displayed as a notification?
Thanks for another great card. Finally I was able to achieve some kind of satisfying layout. It uses other great custom cards and layouts, but without making it too complex I created an interface that emulates a windows 10 desktop. I would be nice to have an option for up-down slide (or down-up slide).