Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location of current dimmer value #5

Closed
gerard33 opened this issue Sep 10, 2018 · 6 comments
Closed

Location of current dimmer value #5

gerard33 opened this issue Sep 10, 2018 · 6 comments
Labels
enhancement New feature or request

Comments

@gerard33
Copy link

Is it possible to show the current dimmer value on the second row and not making it replace the toggle?

Like the screenshot below where the last-changed time is shown.
screenshot_1

@gerard33
Copy link
Author

gerard33 commented Oct 3, 2018

I have done some trial and error, but can't get the value on the secondary line.

I am not able to get it in the flex div in which the name of the entity is, but only in the flex div in which the slider is. Can you give me some hints?

screenshot_1

@thomasloven
Copy link
Owner

thomasloven commented Oct 3, 2018

I've been experimenting a bit and it can be done with
this.shadowRoot.querySelector('hui-generic-entity-row').shadowRoot.querySelector(".flex .info .secondary slot[name=secondary]).innerHTML = this.value placed in updateSliders.
It's not pretty, and it needs a bit of configuration option checks and such, but it works.

@gerard33
Copy link
Author

gerard33 commented Oct 3, 2018

Thanks, but after some more trial and error I have found out that this is not enough hints for me 😉

And I guess there is a quote missing in the second querySelector.

@thomasloven thomasloven added enhancement New feature or request and removed feature request labels Mar 14, 2019
@skynet01
Copy link

You can make it semi smart. For example: when enabled the number shows up instead of toggle but clicking the number would toggle it off (so it's like invisible toggle). When slider is at 0 it would show toggle again and hide the number.

@thomasloven
Copy link
Owner

Here's a way to get a custom value into the secondary info spot using card-mod
https://github.com/thomasloven/lovelace-card-mod/blob/master/test/views/tricks.yaml#L163-L170

@gerard33
Copy link
Author

Thanks! About time to close this issue then 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants