thomasloven / lovelace-template-entity-row

🔹 Display whatever you want in an entities card row.
MIT License
210 stars 16 forks source link

input_number does not work as expected #22

Closed akasma74 closed 4 years ago

akasma74 commented 4 years ago

HA: 0.106.6 This component: 1.1.0 Browser: Safari, Chrome OS X 10.11.6

When I use this entity row for input_number, I get a read-only representation of it regardless of its mode. Here is my config:

type: entities
entities:
  - entity: automation.ventilation_1st_floor_bathroom_extractor_fan_turn_on_by_humdity_gradient
    name: by humidity gradient

  - type: custom:template-entity-row
    entity: input_number.ventilation_1st_floor_bathroom_shower_humidity_threshold

Screen Shot 2020-03-22 at 21 22 32 (2)

thomasloven commented 4 years ago

Yes. That's what the template-entity-row does. I will not expand it with this feature.

akasma74 commented 4 years ago

@thomasloven you're the owner of this component and can do waht you think is right but don't you think things like that should be reflected in the documentation? I chose this component consodering its ability to hide itself conditionally and then spent some of time trying to make it work. I've learnt something and I'm not complaining, but I believe there were and will be many others goint this route.

thomasloven commented 4 years ago

The thing is that would require special cases for every type of entity row, and that's an effort I'm not ready to put into this. The conditional hiding is not the main feature of this row - that's to display the value of a template.

Maybe try this instead?

akasma74 commented 4 years ago

The thing is that would require special cases for every type of entity row, and that's an effort I'm not ready to put into this.

I agree.

The conditional hiding is not the main feature of this row - that's to display the value of a template.

I understand it but wanted to use that feature is it's there

Maybe try this instead?

well, I didn't want to create a complex layout out of multiple horizontal/vertical stacks. currently I use exactly that card and it looks huge so I'll need to apply card-mod to reduce space between elements - I presume it would be neater using this entity_row. Screen Shot 2020-03-24 at 13 50 22 (2)

thomasloven commented 4 years ago

That link wasn't for the conditional card, but for the conditional entity-row, which was added in 0.105 or 0.106, I think.

It's not templateable, though, but I may create another entity row for that at some point... unless someone else does first.

akasma74 commented 4 years ago

That link wasn't for the conditional card, but for the conditional entity-row, which was added in 0.105 or 0.106, I think.

Yes, I remember that. My bad. Looked at it and that's almost exactly what I need, just tried. Cannot use it as there is a glitch - look at the first slider Screen Shot 2020-03-24 at 18 28 45 (2)

It's not templateable, though, but I may create another entity row for that at some point... unless someone else does first.

That would be great if you could, I believe there are many use cases which require entity-row rather than card. In my particular case no templating was needed to hide an entity based on state of another entity. I accomplished it by using your card-mod to add display: none; to those input_numbers, here's how it looks Screen Shot 2020-03-24 at 18 29 55 (2)

Thanks again for explaining the situation and following up, really appreciate it!