Lovelace: Versatile Swiss Army Knife Custom Card

Hey tuupos thanks for reply. Was ill sorry for delay. On charging pulse animation the blue one (next step)
On discharge pulsing the violet one (actual step)

Hello all, I was wondering if anyone has the same issue as I. I don’t know exactly when but I noticed last Sunday that the 5 day weather forcast and SAK is not working any more. When I disable all the entities on the card (it is a part of the example from Mars) I have a empty card, as expected. When I enable all the entities the card disappears (not visable). I found out that when I disable the use
svg part (images in the circle) the card stay’s visable.


picture_002
picture_003

Normally I use buienradar (Dutch provider) and it worked until some time ago. I did a test with met.no with the same result. The funny part is that when I click double on these entities the information is shown. So seperatly things just works fine. First screenshot shows also a SAK card which is the first part of the example of Mars.

I’m still in the dark why. Just to be sure I did redownload SAK but it did not do the trick. Any else experianced this?

Hi,

Have you adapted your code with the new way to have the weather forecast? You must use the weather.get_forecasts service to get it since the Core 2024.4 update.

He ValMarDav,

No I did not. I will follow the link you send to enable it. Thanks for your assistant.

Ok, I checked the weather integration link you gave and I’m confused. No idea where the service weather.get_forcast is and how to adjust.

Started reading and followed the link weather category. After that opened buienradar. It does not mention anything about adding a service. It should be there. The only thing needs to be done according to the site is enable the by default disabled entites, this was already the case and it is working for I can see information when I open the entity.

Hi,

This discussion shows you how to use the new weather.get_forecasts service.

Hi ValMarDav,

Thank you for the links, I have two working entities. Did not change anything on the dashboard but the entities are poupated with information. After correction some typo errors I get this warning.

Screenshot_20240505_160356

I can repair it with the message that the repair was succesfull but when I reboot HA it comes back again.

Later I will change the entites on my dashbard - I’ll let you know what the results are.

Hi,

This is the old service, you must use the new one with an s at the end of the name.

weather.get_forecasts 

Here is an example of how to use the service to obtain forecasts. Day one of the forecasts.


template:
  # Obtenir les pévisions journalières

  - trigger:
      - platform: time_pattern
        hours: /1
    action:
      - service: weather.get_forecasts
        data:
          type: daily
        target:
          entity_id:
            - weather.forecast_shawinigan_sud
        response_variable: previsionsj1
    sensor:

      # Conditions
      
      - name: "def_previsions_condition_j1"
        unique_id: "def_previsions_condition_j1"
        state: "{{ previsionsj1['weather.forecast_shawinigan_sud'].forecast[1].condition }}"
        
      # Date et heure
      
      - name: "def_heure_date_j1"
        unique_id: "def_heure_date_j1"
        state: "{{ previsionsj1['weather.forecast_shawinigan_sud'].forecast[1].datetime }}"

      # precipitation probability

      - name: "def_previsions_precipitation_probability_j1"
        unique_id: "def_previsions_precipitation_probability_j1"
        unit_of_measurement: "%"
        state: "{{ previsionsj1['weather.forecast_shawinigan_sud'].forecast[1].precipitation_probability }}"        

      # Temperature

      - name: "def_previsions_temperature_j1"
        unique_id: "def_previsions_temperature_j1"
        unit_of_measurement: "°C"
        state: "{{ previsionsj1['weather.forecast_shawinigan_sud'].forecast[1].temperature }}"

      # Basse température

      - name: "def_previsions_templow_j1"
        unique_id: "def_previsions_templow_j1"
        unit_of_measurement: "°C"
        state: "{{ previsionsj1['weather.forecast_shawinigan_sud'].forecast[1].templow }}"

      # Precipitation

      - name: "def_previsions_precipitation_j1"
        unique_id: "def_previsions_precipitation_j1"
        unit_of_measurement: "mm"
        state: "{{ previsionsj1['weather.forecast_shawinigan_sud'].forecast[1].precipitation }}"

The code above you mentioned earlier does not have the s in the end so that’s why I did not add it. Now I did at the s in the end and then the entities are not loaded.

# Weather forcast
template:
  - trigger:
      - platform: time_pattern
        minutes: "*"
      - platform: homeassistant
        event: start
      - platform: event
        event_type: event_template_reloaded
    action:
      - service: weather.get_forecasts
        target:
          entity_id: weather.forecast_home
        data:
          type: hourly
        response_variable: hourly_forecast
      - service: weather.get_forecasts
        target:
          entity_id: weather.forecast_home
        data:
          type: daily
        response_variable: daily_forecast
    sensor:
      - name: "weather hourly"
        unique_id: home_hourly
        state: "{{ states('weather.forecast_home') }}"
        attributes:
          temperature: "{{ state_attr('weather.forecast_home', 'temperature') }}"
          dew_point: "{{ state_attr('weather.forecast_home', 'dew_point') }}"
          temperature_unit: "{{ state_attr('weather.forecast_home', 'temperature_unit') }}"
          humidity: "{{ state_attr('weather.forecast_home', 'humidity') }}"
          cloud_coverage: "{{ state_attr('weather.forecast_home', 'cloud_coverage') }}"
          pressure: "{{ state_attr('weather.forecast_home', 'pressure') }}"
          pressure_unit: "{{ state_attr('weather.forecast_home', 'pressure_unit') }}"
          wind_bearing: "{{ state_attr('weather.forecast_home', 'wind_bearing') }}"
          wind_gust_speed: "{{ state_attr('weather.forecast_home', 'wind_gust_speed') }}"
          wind_speed: "{{ state_attr('weather.forecast_home', 'wind_speed') }}"
          wind_speed_unit: "{{ state_attr('weather.forecast_home', 'wind_speed_unit') }}"
          visibility: "{{ state_attr('weather.forecast_home', 'visibility') }}"
          visibility_unit: "{{ state_attr('weather.forecast_home', 'visibility_unit') }}"
          precipitation: "{{ state_attr('weather.forecast_home', 'precipitation') }}"
          precipitation_unit: "{{ state_attr('weather.forecast_home', 'precipitation_unit') }}"
          forecast: "{{ hourly_forecast.forecast[:5] }}"

      - name: "weather_daily"
        unique_id: home_daily
        state: "{{ states('weather.forecast_home') }}"
        attributes:
          temperature: "{{ state_attr('weather.forecast_home', 'temperature') }}"
          dew_point: "{{ state_attr('weather.forecast_home', 'dew_point') }}"
          temperature_unit: "{{ state_attr('weather.forecast_home', 'temperature_unit') }}"
          humidity: "{{ state_attr('weather.forecast_home', 'humidity') }}"
          cloud_coverage: "{{ state_attr('weather.forecast_home', 'cloud_coverage') }}"
          pressure: "{{ state_attr('weather.forecast_home', 'pressure') }}"
          pressure_unit: "{{ state_attr('weather.forecast_home', 'pressure_unit') }}"
          wind_bearing: "{{ state_attr('weather.forecast_home', 'wind_bearing') }}"
          wind_gust_speed: "{{ state_attr('weather.forecast_home', 'wind_gust_speed') }}"
          wind_speed: "{{ state_attr('weather.forecast_home', 'wind_speed') }}"
          wind_speed_unit: "{{ state_attr('weather.forecast_home', 'wind_speed_unit') }}"
          visibility: "{{ state_attr('weather.forecast_home', 'visibility') }}"
          visibility_unit: "{{ state_attr('weather.forecast_home', 'visibility_unit') }}"
          precipitation: "{{ state_attr('weather.forecast_home', 'precipitation') }}"
          precipitation_unit: "{{ state_attr('weather.forecast_home', 'precipitation_unit') }}"
          forecast: "{{ daily_forecast.forecast[:5] }}"

Must be another typo somewhere although I don’t see it. The entity_id is correct, checked that one.

Changed the minutes: “*” to hours: /1 does no change anything

Hello ValMarDav,

Don’t know why your suggestion is deleted, it was the solution. There was one small error in the “deleted” code what even a noob like me could spot.

The ’ after home was the wrong one. Thanks for your patience and assistant.

Hi, Glad to see that it works, actually I destroyed my message because there was an error and I didn’t take the time to find it. I didn’t want to give you a solution that didn’t work. :grinning:

Just reading this thread, it’s quite an impressive UI.
Before I dig too far into it, and seeing that it’s no longer supported, do you guys think that it’s worth while installing or it’s just a matter of time until it breaks completely?

Hello Bernard, For me I do not have any issues with the card itself. More my lack of knowledge about the coding around it. You can use it but it does require some manual steps. Just follow the manual (https://swiss-army-knife-card-manual.amoebelabs.com/) and tutorials.

If Mars has stopped development, we don’t know for sure, maybe another programmer can pick it up to continue the development. I believe the sourcecode is on github. It would be a pitty if such a flexible card would go to waste.

3 Likes

Hello all,

Now that the weather entities are working again I continued the design of my weahter-wheel. It is not quit perfect though. I was wondering if it is posible to put the weather camera on the background (camera.buienradar). I have seen someone on a Dutch forum who did it but there was until now no response on the how.

Can anybody give a hint on the how-to? If needed I will post the code.

Got it. Now just some make-up to make it look nice. :slight_smile:

3 Likes

Hello
how do install it from step 2? I have installed step 1 with HACS.
I don’t find the folders mentionned with File editor.

Thanks

You have to download the zip file from github. (Release v2.5.1-dev.2 · AmoebeLabs/swiss-army-knife-card · GitHub), extract the zip file and place the content of ha-config folder in the corresponding folders of HA. DO NOT OVERWRITE CONFIGURATION.YAML OR UI-LOVELACE.YAML. Look, compare and only take those parts you are missing.

Screenshot_20240505_160356

1 Like

Thanks.
I don’t have the same structure. I don’t have a lovelace folder.
My ui-lovelace.yaml file is located at /homeassistant/ui_lovelace_minimalist/dashboard/ui-lovelace.yaml

So, i will have 2 ui-lovelace.yaml files?

In the ZIP dev2 i have 2 folders for config: ha-config & ha-config-beta.
Wich one i copy?

If you don’t have a lovelace folder then create one. You do not use 2 ui-lovelace files. look if youy need any of the code provided in the zip file, if not just leave it. I guess the best for you is to use the ha-config folder and not the beta.