ben8p / lovelace-tab-redirect-card Goto Github PK
View Code? Open in Web Editor NEWCustom lovelace card to use in Home assistant allowing you to redirect a user to certain view based on entity states.
Custom lovelace card to use in Home assistant allowing you to redirect a user to certain view based on entity states.
It would be great if the redirect would function when the dashboard was loaded, and not just when the entity state changes.
Why do I need to specify "user"?
How to redirect every user?
Thanks for making this! Exactly what I was after, a simple way to switch tabs when a temperature goes above a certain value.
Can you please explain a little more the configuration though? As it's a card, I'm assuming it remains hidden once configured correctly?
To test it, I'm using it on the first tab of a secondary Lovelace dashboard and have added the card to the first tab page. However, once configured, it's asking me to define the index. Where is that done? I've renamed by two tabs 0 and 1. Is that all I need to do?
You need to define redirect_to_tab_index (integer, starting from 0)
type: 'custom:tab-redirect-card'
redirect:
- user: Pete
entity_id: light.family_room_lamp
entity_state: 'on'
redirect_to_tab: 1
I've also tried renaming the two tabs to redirect_to_tab_index_0 and redirect_to_tab_index_1 but that does not work either.
I upgraded to home assistant core 2023.4, which broke all of my redirect cards. Each has the same error:
null is not an object (evaluating 'header.classList")
Upgrading to 2023.4.1 did not fix it.
Example Card yaml:
type: custom:tab-redirect-card
redirect:
- user: haadmin
entity_ id: timer. dash2
entity state: 'idle’
redirect to tab index: 1
Hey Ben,
Confusing title I know. Seems that when I set the user to have the default dashboard (under user profile) to the new (tablets) dashboard I created, the tab redirect cards reappear and take up space again. I have several of your cards configured on a secondary dashboard that works well now, but it seems, only as long as I have the users profile set to 'default' dashboard and then select my 'tablets' dashboard with your cards in it.
Setting the users profile to have the default dashboard as my 'tablets' dash, blank (tab-redirect) cards reappear and take up space.
I want to have the tablets dashboard as the default so I can use Fully Kiosk App to restart the Home Assistant app after HA boot as my camera images never load until the app is closed and re-opened.
That all make sense?
hy
I can only switch from the first tab (0) to any other tab
If I like to switch from the 2nd tab to the 0 tab it does not work.
Is this normal or should we be able to switch from any card to any card as long as the 'custom:tab-redirect-card' is added?
Andy
Can I use this to redirect to a tab on a different dashboard?
If yes: how?
If not: please consider this a feature request.
Using the readme configuration example, if I have a user registered as “Foo” in home assistant, the redirect card won’t work.
type: 'custom:tab-redirect-card'
redirect:
- user: 'foo'
entity_id: 'input.binary.is_home'
entity_state: 'on'
redirect_to_tab_index: 1
Hi Ben,
Is it possible to add from: and to: to states as HA does? I have a Weber iGrill thermometer that I've created a custom giant gauge card for so my wife can see the temperature across the room. I want your integration to switch LL to the gauge tab but the sensor only has one state; either 'unknown' or not unknown so I'm using the following in my automations.
trigger:
- platform: state
entity_id: sensor.igrill_thermometer
from: 'unknown'
trigger:
- platform: state
entity_id: sensor.igrill_thermometer
to: 'unknown'
If it is not unknown, it reads the value but I can't put that either e.g > 20.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.