My Lovelace Plugins

Question re slider entity row:

I’m using the slider entity row on an MQTT cover with position_topic and set_position_topic defined like so:

- platform: mqtt
  name: Back Bedroom Shutter
  command_topic: "cmnd/sonoff11/Backlog"
  position_topic: "sonoff11/position"
  set_position_topic: "sonoff11/set_position"
  payload_open: "POWER1 ON"
  payload_close: "POWER2 ON"
  payload_stop: "POWER1 OFF ;POWER2 OFF"

This automation is triggered when the slider is moved:

- id: Back_bed_pos
  alias: Back Bed Set Pos
  trigger:
  - platform: mqtt
    topic: sonoff11/set_position
  action:
  - service: notify.ios_pierres_iphone
    data_template: 
      message: ">{{ trigger.payload }}<"

except when the slider is moved to 0 (zero). In this case the automation is triggered but the notification is not displayed, as if trigger.payload is not there.

If I use the position slider in the normal information box for this cover and move the slider to 0, the automation triggers and displays the notification with message >0< as expected.

In Lovelace I have:

  - entity: cover.back_bedroom_shutter
    secondary_info: last-changed
  - entity: cover.back_bedroom_shutter
    full_row: true
    type: 'custom:slider-entity-row'

What am I missing?

Thank you

I just added a feature to card-modder which I think is kind of neat.

In effect it lets you animate cards to an extent:
extra_styles

I implemented it mainly to allow for flashing buttons to indicate alarm states, but you can also do stupid things like this (which is strictly forbidden by the material design specification):
card%20animations

Oh, and it can be used for picture-elements too:
itsallteachingbirdsfault

Let me know if you can figure out how…

5 Likes

The blink is great. The picture elements example… :rofl::crazy_face:

Absolute madness. Might actual get around to doing a floorplan with animated doors now! Good work, Thomas!

3 Likes

If I could :heart: this idea 10 times, I would. Sadly I was limited to once.

All my slider-entity-row’s disappeared with latest cde2a9.
Is this related to the new beta 0.88.0b0?

No. Thomas is aware of the bug according to chat.

Yeah. Sorry. I didn’t test my changes well enough. Should be fixed now. 0c5560

Hmm, sorry, but this didn’t fix it for me.
Still no sliders.

Try be80ff then…
Really sorry about this.

BINGO! :slightly_smiling_face:
Thanks alot!

TOTAL GENIUS!!! Thanks again for another brilliant enhancement!!! :clap:

I might have some weird cache issue maybe?
Using the custom:state-switch i need to “refresh” to see the new card.
First card shows up


But when i change to any of the other 2 i get:

Until i click the Lovelace “refresh” button, then i get:

But on change to next i get the empty card:

Until refresh:

I am running the latest card / resources

5 Likes

Do you think you could put together a minimal working example and show me the code?

Here is a smaller version:

title: Title View
cards:
  - type: custom:compact-custom-header
  - type: entities
    entities:
      - input_select.remote
  - type: custom:state-switch
    entity: input_select.remote
    states:
      SHIELD:
    #------------------------------------------------------------------
    # SHIELD CONTROLLER
    #------------------------------------------------------------------
        type: custom:layout-card
        layout: vertical
        cards:
          - type: horizontal-stack
            cards:
              - type: custom:card-modder
                card:
                  type: picture
                  image: /local/lovelace/images/shield.png
                style:
                  overflow: hidden
                  padding: 10px 10px 10px 10px
                  border-radius: 20px
                  border: solid 1px rgba(100,100,100,0.3)
                  box-shadow: 3px 3px rgba(0,0,0,0.4)
      TIVO:
    #------------------------------------------------------------------
    # TIVO - SONOS CONTROLLER
    #------------------------------------------------------------------
        type: custom:layout-card
        layout: vertical
        cards:
          - type: horizontal-stack
            cards:
              - type: custom:card-modder
                card:
                  type: picture-elements
                  image: /local/lovelace/images/tivobox.png
                  elements:
                    - type: state-label
                      entity: sensor.sonos_volume_level
                      prefix: 'Volym - '
                      tap_action: none
                      hold_action: none
                      style: {color: white, left: 14%, top: 25%}
                    - type: state-label
                      entity: sensor.kanal
                      prefix: 'Kanal - '
                      tap_action: none
                      hold_action: none
                      style: {color: white, left: 87%, top: 25%}
                style:
                  overflow: hidden
                  background-image: url("/local/lovelace/images/cardbackK.png")
                  background-repeat: no-repeat
                  background-color: rgba(50,50,50,0.3)
                  background-size: 100% 161px
                  border-radius: 20px
                  border: solid 1px rgba(100,100,100,0.3)
                  box-shadow: 3px 3px rgba(0,0,0,0.4)
      CHANNELS:
    #---------------------------------------------------------
    # Favotite Channels
    #---------------------------------------------------------
        type: custom:layout-card
        layout: vertical
        cards:
          - type: horizontal-stack
            cards:
              - type: custom:card-modder
                card:
                  type: picture
                  image: /local/tv/Logo-SVT1-HD-liten.png
                  hold_action: none
                  tap_action:
                    action: call-service
                    service: switch.turn_on
                    service_data:
                      entity_id: switch.tivo_svt1
                style:
                  overflow: hidden
                  padding: 5px 5px 5px 5px
                  background-color: rgba(68,153,203,1)
                  border-radius: 20px
                  border: solid 1px rgba(100,100,100,0.3)
                  box-shadow: 3px 3px rgba(0,0,0,0.4)
              - type: custom:card-modder
                card:
                  type: picture
                  image: /local/tv/Logo-SVT2-HD-liten.png
                  hold_action: none
                  tap_action:
                    action: call-service
                    service: switch.turn_on
                    service_data:
                      entity_id: switch.tivo_svt2
                style:
                  overflow: hidden
                  padding: 5px 5px 5px 5px
                  background-color: rgba(68,153,203,1)
                  border-radius: 20px
                  border: solid 1px rgba(100,100,100,0.3)
                  box-shadow: 3px 3px rgba(0,0,0,0.4)
              - type: custom:card-modder
                card:
                  type: picture
                  image: /local/tv/logo-tv3-hd-liten.png
                  hold_action: none
                  tap_action:
                    action: call-service
                    service: switch.turn_on
                    service_data:
                      entity_id: switch.tivo_tv3
                style:
                  overflow: hidden
                  padding: 5px 5px 5px 5px
                  background-color: rgba(68,153,203,1)
                  border-radius: 20px
                  border: solid 1px rgba(100,100,100,0.3)
                  box-shadow: 3px 3px rgba(0,0,0,0.4)
2 Likes

That’s an epic setup by the way

With the pop-up card, is it possible to pop up a card and execute a service?

Do you mean like this?motion detected control panel popup

Exactly like that. Thank you.

Really interesting use case. I never thought of that.
Try updating layout-card to 616f74.

2 Likes