GithubHelp home page GithubHelp logo

Comments (6)

thomasloven avatar thomasloven commented on July 17, 2024 2

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.

from lovelace-slider-entity-row.

gerard33 avatar gerard33 commented on July 17, 2024

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

from lovelace-slider-entity-row.

gerard33 avatar gerard33 commented on July 17, 2024

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.

from lovelace-slider-entity-row.

skynet01 avatar skynet01 commented on July 17, 2024

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.

from lovelace-slider-entity-row.

thomasloven avatar thomasloven commented on July 17, 2024

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

from lovelace-slider-entity-row.

gerard33 avatar gerard33 commented on July 17, 2024

Thanks! About time to close this issue then 😉

from lovelace-slider-entity-row.

Related Issues (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.