#Auto entities and Mushroom Chips

1 messages · Page 1 of 1 (latest)

paper crest
#

Here's my code:

#

type: custom:auto-entities show_empty: true card_param: chips card: type: custom:mushroom-chips-card alignment: justify filter: include: - domain: scene area: Living room exclude: [] sort: method: friendly_name

#

As per usual with HA, I feel like I am missing something obvious but because I have been tinkering with it on and off for several hours today I can't quite see the thing clearly anymore.

pearl depot
#

You're just missing this in your include definition:

options:
  type: entity
#
type: custom:auto-entities
show_empty: true
card_param: chips
card:
  type: custom:mushroom-chips-card
  alignment: justify
filter:
  include:
    - domain: scene
      area: Living room
      options:
        type: entity
  exclude: []
sort:
  method: friendly_name
paper crest
#

I had to change the area to the area ID and not the friendly name but that got it to work. It shows the icon and the last time it was activated - let me see how that is labeled in the chips card ...

#
type: custom:auto-entities
show_empty: true
card_param: chips
card:
  type: custom:mushroom-chips-card
  alignment: justify
filter:
  include:
    - domain: scene
      area: Living Room
      options:
        type: entity
        content_info: name
  exclude: []
sort:
  method: friendly_name
#

That does it! Thanks @pearl depot

paper crest
#

Alright, more strange buggy behavior. I had several scenes that did not have an area either because I had forgotten to associate them with an area or because they were across the whole house - I added a "Whole House" area, associated all the scenes with an area, then I tried to create an auto filter for the whole house. Now does not see any scene that I updated today, nor does it seem to see the new area. Is this a case where I just have to turn it on and off a few times or does it update every 24h or what?

#

I tried adding it as a label for good measure and no dice with that either.

#

Ahh, solved it. Re-downloading the card seems to have forced it to refresh

paper crest
#

Alright this is close to being finished, and when I am done I am posting a long detailed guide on how to set this up in the auto entities thread. The last hurdle I am trying to solve is to have the tap action apply the scene rather than call up the more info dialogue. Any ideas on how to gracefully do this?

pearl depot
#

Could you post your full code?

paper crest
#

Sorry, just saw this. Here's the code I currently have for the scenes card

#
type: custom:auto-entities
show_empty: true
card_param: chips
card:
  type: custom:mushroom-chips-card
  alignment: justify
filter:
  include:
    - domain: scene
      area: Living Room
      options:
        type: entity
        content_info: name
        tap-action: toggle
  exclude: []
sort:
  method: friendly_name
#

Basically the same as above - I tried to add the tap action but it didn't do anything.

#

The only way I could see to do this was to have the tap action call "Scene Activate" but that makes for a gigantic kettle of fish for templating the name of the scene into a variable and passing it to the particular chip. If there is a simpler way to do this, I am all ears

pearl depot
#

So remember that the options along with the card definition together is what makes up what's finally created by auto-entities

#

So what I'd suggest doing for starters when an auto-entities card isn't acting as expected is create the card manually with one example entity and see what it looks like

#

So you're card would look something like:

type: custom:mushroom-chips-card
alignment: justify
chips:
  - type: entity
    entity: scene.foobar
    tap_action: toggle
    content_info: name

Which gives the error:
At path: chips.0.tap_action -- Expected an object, but received: "toggle"

#

Let me know if this gets you on the right track

paper crest
#

Not really. Let me re-word my question: is this something that can be done simply via the options or will I need to dive into templating to be able to pass the entity name as a variable that I can use to call scene.turn_on?

#

The process you described is what I used to get the tap_action: toggle in the options in the code I have had sitting there for a few days. The strange part about it is when I add the chips manually to a chips card, the toggle action works.

#

I know I will need to do some templating to get the icon color right so I will work on that while I stew on the toggle action within the auto entities card.

pearl depot
#

I believe you aren't creating the tap_action correctly. It isn't a string value, it's an object

#

It isn't tap_action: toggle but rather

tap_action:
  action: toggle
paper crest
#

Ahhh you are right! Let me try that

#

That worked! I will draw up a post tonight on the forums so that way there's a spot where this is clearly documented and why. Do you have a Kofi or somewhere I can buy you a coffee as a thank you for your help?

pearl depot
#

Awesome, good to hear. Yeah when having issues with the auto entities card it's always a good idea to create the card manually and compare your card and options in the auto-entities card to what you have in your manually created card.

pearl depot
#

Let me know if you have any more trouble with the card

paper crest