is it possible to use other custom cards inside the sak card?
Hi me again,
Maybe this topic/ problems has already passed in this forum, but if ok I will ask again.
I have installed sak in hybride mode.
After doing some test with the sak sakeX examples I have built some custom cards in my own dashboard.
They are working fine, butā¦
After I login to my devices and open my specific dashboard with sak cards I get following error;
I can solve this after I do a āreconfigerā under the sak example dashboard, and also do a refresh of my HA.
Then the results are fine, like this;
But after I have logout and go back and login in to my HA, I get the same results, see first screenshot!
Is there something wrong with my pathās? Do I missed some sak configurations?
Thanks to help me out here!
Jurgen
I donāt see this condition regularly but it has appeared occasionally and only when using templates for layouts or toolsets. Iām thinking it has something to do with the speed and order in which the various !include
statements are processed by the SAK environment. As you mentioned, a refresh of the view or reloading the page seems to fix it. I havenāt looked into it any further than this though.
I have this problem each time if I swap to another device or logout and login again to HA!
It is not occasionally!
Maybe there are still some pathās who are not ok on my sak environment?
I guess most problems I have is if I use templates from the default sak directory.
Is there anything I can check?
It does not appear so. If you want the visual appearance of multiple cards as the same card, have a look at the stack-in card. I have not tried this card yet but have been looking at it. Depending on what your goal is, it might be worth experimenting with.
Ok no problem James!
Ok I will try this!
@jwaz73 & @AmoebeLabs - and whomever may know something about this card.
Thereās a billion things I need to understandā¦ but to ask 1 thing that puzzles meā¦
On the website - looking at the documentation for lightsā¦ I see an example card that calls a decluttering templateā¦
- how the devil do I interpret the template?
- having installed the example dashboard(s) ā¦ and playing around with thatā¦ I notice that in the dashboard examples the decluttering template is NOT used - all the template code is directly in the example yaml?
I took the code from the example and made a template fileā¦ and after moving stuff around so indentation etc. was correct I can use that template in my card.
I must sayā¦ the learning curve for this is hugeā¦ at least when youāre not a template/css guruā¦
92% of everything I do not understandā¦
Hi, I installed the Examples dashboards and the sake5 is working but when i use it on my dashboard āstorageā de card only shows when I do a refresh on sake5 page.
On my phone nevers appears on my dashboard.
Can anyone help?
I canāt put the
sak_sys_templates:
!include www/community/swiss-army-knife-card/sak_templates.yaml
sak_user_templates:
!include lovelace/sak_templates/sak_templates.yaml
on my ui dashboard because its not YAML
Hello, I donāt have the same as osvaldocipriano, but itās close.
I cannot get the cards to work at all. I also use āstorage modeā
In the installation, I get to step 2b and donāt know where to put the sak_sys_templates: !include and the sak_user_templates: !include.
I tried putting in the raw edit of the Lovelace UI, but Iām not able to save them there.
When I save them, I get the error āYAML Exception: unknown tag !<!include>ā.
So any help please!
If you are using this magnificent card, you have probably noticed that it doesnāt work since upgrading to Home Assistant 2023.4.0 or above. Well, have no fear, for I have found the issue.
This appears to be caused by a change in 2023.4.0 that makes custom-card-tools (which swiss-army-knife-card uses) break. I have a pull request in against custom-card-tools to fix this here:
In the meantime, to get swiss-army-knife-card working, you can grab the file from here:
https://raw.githubusercontent.com/cerebrate/custom-card-helpers/master/dist/index.m.js
place it in the www/community/swiss-army-knife-card/
directory under your Home Assistant configuration directory under the name custom-card-helpers.m.js
, and then very carefully find the part at the top of swiss-army-knife-card.js
in the same directory that reads
import{fireEvent,stateIcon,getLovelace}from"https://unpkg.com/[email protected]/dist/index.m.js?module";
and change that and only that to
import{fireEvent,stateIcon,getLovelace}from"/local/community/swiss-army-knife-card/custom-card-helpers.m.js?module";
Since the browser will use the compressed version of the .js file if it can, after you have edited swiss-army-knife-card.js, delete swiss-army-knife-card.js.gz, and then make a new compressed version of your edited file with
gzip -k swiss-army-knife-card.js
Donāt omit the -k, because you need both the .js and the .js.gz there. Youāll need to do this any time you edit the .js.
Clear caches, reload resources, refresh, etc., and otherwise do the needful to get your browser to notice the changes, and you should have a working swiss-army-knife-card again.
Hope this is of use.
try to get this work but no luckā¦
on my location
\192.168.x.x\config\www\community\swiss-army-knife-card
I put the custom-card-helpers.m.js module
in the swiss-army-knife-card.js
I had the rule changed to
import{fireEvent,stateIcon,getLovelace}from"/local/community/swiss-army-knife-card/custom-card-helpers.m.js?module";
but also to
import{fireEvent,stateIcon,getLovelace}from"/config/www/community/swiss-army-knife-card/custom-card-helpers.m.js?module"
without any luckā¦
on my github put the helpers file should be okay in my opinion.
Github dvine2000
reboot, reload and try other browser nothing makes this fix workā¦
I think I do something wrong
back to old version with this line
import{fireEvent,stateIcon,getLovelace}from"/config/www/community/swiss-army-knife-card/custom-card-helpers.m.js?module"
and cards are workingā¦
So think to location and helpers.n.js are working and okay
Just realized after people couldnāt get this to work that I accidentally forgot to mention a step. If youāre having trouble with this, check you did the gzip step Iāve edited into the above procedure.
yes that seems to work.
I did it with 7-zip in windows there is a option to archive to .gz
lots of clear cache, restarts needed but goog to go now.
Question,
when I implement e toggle switch, always when I click on it, the -more dialog- box pops up. So instead of toggling the switch, the dialog box pops up and there I can turn the switch. I used helper switch, real switch but no succes.
- toolset: colomn-XAB
position:
cx: 150
cy: 145
tools:
- type: switch
entity_index: 6 # #3
position:
cx: 50
cy: 50
# track:
# width: 100
# height: 30
# radius: 1
# thumb:
# width: 25
# height: 25
# radius: 1
# offset: 12
orientation: 'horizontal'
user_actions:
tap_action:
haptic: light
actions:
- action: call-service
service: switch.toggle
wehereas entity_index 6 =
# 6 als test switch, weer te verwijderen bij werkende config
- entity: switch.ac_1c1331f_3
Thanks for any help
Indentation errorā¦ fixed it. tap_action was not correct indeted
user_actions:
tap_action:
haptic: light
actions:
- action: call-service
service: switch.toggle
Works like a charm !
Did you manage to use the new function which allows to have several entity_index:? I canāt get it to work.
- type: state
position:
cx: 82
cy: 60
entity_indexes:
- entity_index: 6
- entity_index: 7
- entity_index: 8
- entity_index: 9
- entity_index: 10
- entity_index: 11
- entity_index: 12
- entity_index: 13
show:
uom: none
derived_entity:
state: |
[[[ if (state == 'cool') return 'Climatisation'
if (state == 'heat') return 'Chauffage'
if (state == 'dry') return 'DĆ©shumidification'
if (state == 'off') return 'Hors fonction'
return 'Inconnu'
]]]
styles:
state:
text-anchor: start
font-size: 10em
font-weight: 500
opacity: 0.7
animations:
- state: 'off'
entity_index: 7
reuse: true
styles:
icon:
fill: gray
- state: 'off'
entity_index: 8
reuse: true
styles:
icon:
fill: gray
- state: 'off'
entity_index: 9
reuse: true
styles:
icon:
fill: gray
- state: 'off'
entity_index: 10
reuse: true
styles:
icon:
fill: gray
- state: 'off'
entity_index: 11
reuse: true
styles:
icon:
fill: gray
- state: 'off'
entity_index: 12
reuse: true
styles:
icon:
fill: gray
- state: 'off'
entity_index: 13
reuse: true
styles:
icon:
fill: gray
Iām working on a thermostat card intended to mimic the nest thermostats, but have a couple of problems Iām hoping someone out there will have some thoughts on.
-
Wondering if anyone has any ideas on how I could add scale markers to either a circular slider or a segmented arc? The markers in the screenshot are colorlist items with a gap of 1. I put this in here so I could get a sense of the look and feel whilst I was working, but it would be awesome if someone could think of a way to get them at actual scale points (one line every half degree, for example). The nest thermostat also uses slightly bolder lines for the markers between the actual and target temperatures, so Iām hoping getting standard markers will get me one step closer to achieving that.
-
Iām assuming that because Iāve not seen any in the documentation that templating isnāt supported? Iāve tested a template to return a different colour depending on whether the system is heating or cooling, but got a black background when I tried to replace the orange value with the template.
Thanks so much in advance for your help