-
-
Save pjv/521073b982e37418339afbf420691310 to your computer and use it in GitHub Desktop.
See below |
Thanks a lot for this!!! It is exactly what I needed :)
Thanks again for maintaining this, really appreciate it!
Hey, can anyone tell me how to use this please? I have the normal version of CCH working, but not on my Fire HD 8. What do I have to do with this legacy version once I have it installed in
/local/custom-lovelace/compact-custom-header/
and
- url: /local/custom-lovelace/compact-custom-header/compact-custom-header-legacy.js?v=1.0.4
type: js
added to my Lovelace config?
just paste the code from legacy.js (this file) over the standard compact-custom-header.js code and it should be working... however the newest version is not working for me either. Any updates to get the latest version pjv?
Any updates to get the latest version pjv?
I believe that @maykar is working on a new way of referencing the editor component code and once he releases a version with that re-factoring, I should be able to post up a legacy version of that code.
@maykar is now providing an up-to-date version of this legacy code here: https://gist.github.com/maykar/278cf3d81e99a7594d4a0d1677fe981f
I assume this is kaput now? (link above is dead)
I assume this is kaput now? (link above is dead)
You should try asking @maykar if he is still supporting a legacy version of the new custom header which replaced CCH.
There should be no need for a legacy version for the new custom header. I'm now using Babel to convert in the main project in order to support all devices.
NEW LOCATION
@maykar, the author of CCH is now keeping an up-to-date legacy version of CCH at this gist: https://gist.github.com/maykar/278cf3d81e99a7594d4a0d1677fe981f
LAST VERSIONThe current version (1.0.4b8) is the last version I am able to produce automatically and make available here. Due to changes in how the editor component is being dynamically imported, my limited javascript and babelization skills make it so that my automated build no longer works. Someone with more JS fu would probably be able to get more recent versions transpiled successfully. I'm actually still using CCH (currently on version 1.2.1) but using it on my Fire Tablet requires my manually hacking the transpiled code to strip out most everything to do with the editor component. I'm not going to make that code public because it strays too far from @maykar's code.Current (Revision 18) is version 1.0.4b8 of Compact Custom Header transpiled to old javascript for older (pre ES6) devices. As long as I am using CCH, as new versions of CCH are released, I'll revise this gist with updates.For those who know babel better than me (which would be easy) this is the config that I am using for the transpile (suggestions for a better config gratefully encouraged):The resulting commonJS is then processed with browserify to produce the code above.Please note that this version has the Home Assistant Lovelace Editor functions commented out as that was keeping me from successfully producing working js, so this will only be useful to you if you are using yaml mode to manage your Lovelace UI.Editor code included as of revision 2. I am using YAML mode so cannot test, but the editor code is included in this gist. You do not need the separatecompact-custom-header-editor.js
file - it's all in the above.I suggest changing the name so as not to collide with updates to the standard version of CCH. I'm usingcompact-custom-header-legacy.js
. Contrary to the documentation on the CCH github, you should include this in your Lovelace config asjs
rather than asmodule
like so:Finally, this code is 100% unsupported as-is-ware. If it works for you and helps you out, great. But neither myself nor (more importantly) @maykar are supporting this code so if you are running it and you have issues, please don't post them in the original project's github. Just assume that whatever the problem is is my fault and I'm too dumb to fix it.