Lovelace: Versatile Swiss Army Knife Custom Card

Hi Guys,

first of all thanks for your time.
Here´s my Code…it´s simple the original ones.

        ########################################################################

        - type: 'custom:swiss-army-knife-card'
          entities:
            - entity: light.monitore
              name: 'Monitore'
            - entity: light.monitore
              attribute: brightness
              unit_of_measurement: "%"
            - entity: light.monitore
              secondary_info: last_changed
              format: absolute
          layout:
            template:
              name: sak_layout_fce_light_with_slider

        ########################################################################

        - type: 'custom:swiss-army-knife-card'
          entities:
            - entity: light.monitore
              name: 'Monitore'
            - entity: light.monitore
              attribute: brightness
              unit_of_measurement: "%"
            - entity: light.monitore
              secondary_info: last_changed
              format: relative
          layout:
            template:
              name: sak_layout_fce_light_with_slider2

        ########################################################################

        - type: 'custom:swiss-army-knife-card'
          entities:
            - entity: light.monitore
              name: 'Monitore'
            - entity: light.monitore
              attribute: brightness
              unit: "%"
              # format: brightness
              convert: brightness_pct
            - entity: light.monitore
              secondary_info: last_changed
              format: relative
          layout:
            template:
              name: sak_layout_fce_light_with_circslider

And the templates are original too. There is nothing i have edited except the entity

That was my idea too that it has to be relatetd with the derived entity or that the index/state will be overwritten… but with the hint of the converter the last one is kicked off…:wink:
So thanks for that. it´s a step closer to the solution…

@ValMarDav great work.
Can you share the code of this part:

Thanks

Hi,

I’m probably not understanding something here and wonder f anyone can give me some pointers. I’ve installed step 1 using HACS and now trying to do step 2 but can’t find a Lovelace folder. I’m running a Pi4 with Hass.io and have SFTP and SSH etc working.

Is this because Hass.io uses a different folder structure or is it something else? if so, where do the files need to go?

Thanks.

If it’s not yet there, you have to make the folder yourself. I believe it’s only there if you use the yaml version of the frontend, instead of the direct editor.

It should be located in the root folder of your home assistant, i.e. at the same place as where you can find your configuration.yaml

Ah great thanks. I’ll give that a go now :slight_smile:

Is it possible in the next version to make support for the user action type “hold_action” at least for “type: rectex”?

Made on ‘custom:swiss-army-knife-card’, there is a big lack of “hold_action”, I wanted to make a video help on sensors in the dashboard: where they are, what they look like, how to change batteries and what batteries are needed. An example is in the video.

Unfortunately, I believe that this project has been abandoned by the developer. I hope he’s doing well.

1 Like

It’s sad about the project, but Marco would have been fine.

1 Like

Is it really abandoned? Im still working on a perfect dashboard with this card…
Does somebody know if Marco is still active on this project?

No news from him since September 2023. At least I would like him to make version v2.5.1-dev.2 official.

I will ask him how things are going on a dutch forum.

2 Likes

No reaction from him on tweakers since 11/2023 where he commented on my post (@sjeuf)

same here !

Maybe I don’t get it right. I, using the v2.5.1-dev.2 part of the SAKS. But when I try to inplement the new line chart it says: “s[t.type] is not a constructor”

Here is part of the yaml when the error code is generated:

 - type: 'custom:swiss-army-knife-card'
    view_layout:
        grid-area: b4
    entities:
      - entity: sensor.0x00158d0007e056d7_device_temperature #sensor.buiten_temperatuur_temperature
        name: 'Humidity'
        area: 'Study'
        decimals: 0
    layout:
      template:
        name: sak_layout_fce2_awair2a
        variables:
          - sak_layout_awair_chart_type: "barcode"
          - sak_layout_awair_chart_variant: "audio"
          - sak_layout_awair_background_icon_disabled: false
          - sak_layout_awair_sensor_colorstop_v1: sak_colorstops_awair_humidity_v1
          - sak_layout_awair_sensor_colorstop_v2: sak_colorstops_awair_humidity_v2
          - sak_layout_awair_sensor_scale_max: 100

By any chance anyone an idea? did I not correctly install the v2.5.1-dev.2 version?

The indentation is not correct in the code you published. I corrected and it works well.


   - type: 'custom:swiss-army-knife-card'
     view_layout:
        grid-area: b4
     entities:
      - entity: sensor.tempest_st_00032986_humidity
        name: 'Humidity'
        area: 'Study'
        decimals: 0
     layout:
      template:
        name: sak_layout_fce2_awair2a
        variables:
          - sak_layout_awair_chart_type: "barcode"
          - sak_layout_awair_chart_variant: "audio"
          - sak_layout_awair_background_icon_disabled: false
          - sak_layout_awair_sensor_colorstop_v1: sak_colorstops_awair_humidity_v1
          - sak_layout_awair_sensor_colorstop_v2: sak_colorstops_awair_humidity_v2
          - sak_layout_awair_sensor_scale_max: 100

Thanks for your solution, unfortunately it wasnt that. The indentation in my yaml was correct. I just copied en pasted in wrong in this forum. The -type and view_layout etc is correctly aligned.

Moreover, on another page the fce2 examples from marswarrior show the same error.

I thinks I messed something up beacuse of the v2.5.1-dev.2 version. I copied some files over but not all of them. Maybe there is something missing. Are there instructions how to install v2.5.1-dev.2 or is it just copy and paste evertging over v2.5.1?