GithubHelp home page GithubHelp logo

ben8p / lovelace-tab-redirect-card Goto Github PK

View Code? Open in Web Editor NEW
18.0 2.0 3.0 19 KB

Custom lovelace card to use in Home assistant allowing you to redirect a user to certain view based on entity states.

JavaScript 100.00%
lovelace-ui lovelace-custom-card homeassistant hacs

lovelace-tab-redirect-card's People

Contributors

ben8p avatar evansalter avatar wrt54g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lovelace-tab-redirect-card's Issues

Redirect on page load

It would be great if the redirect would function when the dashboard was loaded, and not just when the entity state changes.

Some help with configuration please

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.

HA 2023.4: null in header.classlist

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

Tab Redirect Card does not hide when user defines secondary tab

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?

switch back to other cards not working

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

Username is case sensitive in card configuration

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

Feature Request: From/To states

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.