thomasloven / lovelace-auto-entities

🔹Automatically populate the entities-list of lovelace cards
MIT License
1.2k stars 111 forks source link

template not working #311

Closed emilianogetino closed 1 year ago

emilianogetino commented 1 year ago

Hello, I am trying to make a card that shows me the devices that have a Wi-Fi signal below a threshold indicated by an input_number, the code is as follows:

                                type: custom:auto-entities
                                        show_empty: true
                                        card:
                                          type: entities
                                          title: Low Signal Devices
                                          state_color: true
                                        filter:
                                          include:
                                            - entity_id: sensor.*rssi*
                                              state: < "{{ states('input_number.signal_level') }}"                                             
                                        sort:
                                          method: state
                                          reverse: true

no entity is shown, but if I put the level with a number it works, this code:

                                type: custom:auto-entities
                                        show_empty: true
                                        card:
                                          type: entities
                                          title: Low Signal Devices
                                          state_color: true
                                        filter:
                                          include:
                                            - entity_id: sensor.*rssi*
                                              state: < -80                                             
                                        sort:
                                          method: state
                                          reverse: true

The input_number gives me negative values ​​between -50 and -100. What am I doing wrong? Thank you.

ildar170975 commented 1 year ago

state: < "{{ states('input_number.signal_level') }}"

Templates not supported for options. Use the "template" option.

emilianogetino commented 1 year ago

Thanks for your answer, but unfortunately I'm too new yet. Could you give me an example? point me somewhere to read about it? Thank you

ildar170975 commented 1 year ago

Examples may be found here: https://community.home-assistant.io/t/auto-entities-automatically-fill-cards-with-entities/147801

emilianogetino commented 1 year ago

Thank you

ildar170975 commented 1 year ago

Is the issue still open?

emilianogetino commented 1 year ago

I'm still reading and testing, I haven't gotten it to work yet.

ildar170975 commented 1 year ago

Your issue is a question. It is neither a bug nor a FR. I suggest you to post similar question in the Community and leave Github for bugs and FRs.

emilianogetino commented 1 year ago

ok, Gracias