Closed purcell-lab closed 1 year ago
This looks to be because of https://developers.home-assistant.io/blog/2023/04/04/deprecating_polymer/
Is it possible to transition this package to Lit ?
Broke mine too, it’s better to move it to lit.
Plugin stopped working today after update to 2023.05
Plugin stopped working today after update to 2023.05.
@finity69x2 has had no commits this year and only a couple in Q4 2022.
Anyone capable of taking this over, IE converting it to lit, or are we stuck with the HA vertical extra click to get there button?
Anyone found an alternative?
Yesterday install https://github.com/piitaya/lovelace-mushroom/blob/main/docs/cards/fan.md
Hey all,
I've done the bare minimum to migrate this plugin from Polymer to Lit, you can find it at: https://github.com/shmuelzon/fan-percent-button-row Right now it pulls Lit from the Internet, which I don't really like. Apparently, the proper way to do it is to package Lit inside the custom row JS but, as I have no idea what I'm doing, it will take a bit more time to get it right.
Let me know, on my fork, if something's not working for you.
And many thanks to @finity69x2 for creating it in the first place! If you're still maintaining this repository, please let me know and I'll create a pull request with the changes.
Right now it pulls Lit from the Internet, which I don't really like. Apparently, the proper way to do it is to package Lit inside the custom row JS but, as I have no idea what I'm doing, it will take a bit more time to get it right.
I think it is enough to add import { LitElement, html, css, } from 'lit';
At least the example from Homeassistant at https://github.com/custom-cards/boilerplate-card does it in this way.
I think it is enough to add
import { LitElement, html, css, } from 'lit';
At least the example from Homeassistant at https://github.com/custom-cards/boilerplate-card does it in this way.
I tried that first, but it didn't work. The way that project works is that there's an extra step of packaging everything. They add a dependency on Lit, pull it via NPM, and package their sources and dependencies to a single file with Rollup. I've already done that on my fork and it seems to work fine. I'll push it later on
So I don't see where I can open an issue or comment on your fork. I tried copying the file and replacing the file from HACS but it still fails. Not sure what else to try there.
Right, sorry. I enabled issues on my fork. Anyway, you should be able to take https://raw.githubusercontent.com/shmuelzon/fan-percent-button-row/main/fan-percent-button-row.js as is and replace the existing one. Make sure you refresh your browser and/or clear the cache.
Right, sorry. I enabled issues on my fork. Anyway, you should be able to take https://raw.githubusercontent.com/shmuelzon/fan-percent-button-row/main/fan-percent-button-row.js as is and replace the existing one. Make sure you refresh your browser and/or clear the cache.
I actualy added shmuelzon/fan-percent-button-row in HACS as a custom repository and installed it directly from HACS (I first removed the old polymer version). It then even shows the updates and clears the cache for you.
thanks for fixing this, works as old times!
fan-percent-button-row
is dead, long live fan-percent-button-row
!
I used hansmets suggestion and it worked. However the option to reverseButtons does not work. Not a big thing but it's the way I had it working for my family.
And many thanks to @finity69x2 for creating it in the first place! If you're still maintaining this repository, please let me know and I'll create a pull request with the changes.
absolutely... thank you.
I haven't had any activity on this because...well...it just worked :)
I've been trying to figure this out for the last few weeks and my real life has been ridiculously busy so I haven't had much luck. And unfortunately I haven't had much time to even think about looking here at the issues yet.
If you don't mind I'll look at your repo and see if I can get this working again.
fan-percent-button-row
is dead, long livefan-percent-button-row
!
Hopefully not! :)
now that I have an example to go on.
I used hansmets suggestion and it worked. However the option to reverseButtons does not work. Not a big thing but it's the way I had it working for my family.
In my case, I saw that the reverseButtons option did work, but was the opposite of what I had set, i.e., I needed to set it to false
to get the same results with what I had with the previous version. Maybe the default changed at some point as the version I had was very old?
If you don't mind I'll look at your repo and see if I can get this working again.
Sure thing, let me know if there's anything I can help with
Hi,
Please find attached my own version migrated to lit. If you can review and update your base code it will be great :)
Regards,
Benoît
Hi,
Please find attached my own version migrated to lit. If you can review and update your base code it will be great :)
Regards,
Benoît
I confirm this works. Why don't you actually open a PR to merge in the changes, though? There may be a better shot the maintainer does it quickly if he can just click merge...
Let me know if you need help and I'll PR in your changes.
Hi, Please find attached my own version migrated to lit. If you can review and update your base code it will be great :) Regards, Benoît fan-percent-button-row.js.zip
I confirm this works. Why don't you actually open a PR to merge in the changes, though? There may be a better shot the maintainer does it quickly if he can just click merge...
Let me know if you need help and I'll PR in your changes.
You are right, PR submitted.
Thank you @ben-ty.
I've merged the PR.
I'll be able to use yours as a template to update my others now.
Thank you again very much.
Just updated to v3.0 working as expected 👍🏽, thanks for fixing it @ben-ty @finity69x2
Confirmed x2 - Quick upgrade in HACS and back in action. Thanks @finity69x2 @ben-ty
Should be fixed now.
Looks like some incompatibility with the new version of Home Assistant beta.