-
-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default button actions overrides #183
Default button actions overrides #183
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've suggested a few changes. Please, test locally.
Co-authored-by: Denys Dovhan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposed changes included and tested locally. Thanks!
There is something that maybe should be changed. Differentiate between HandleStart and HandleResume, because probably for most cases only HandleStart must be replaced. Would you like if I add this distinction and include custom action (resume_action) just in case someone needs to override the default behavior for resume too? |
@vicfergar yes, I'd like to. Maybe we can also add custom handlers for stop and pause. Grouping them under the prop would be great. I'd like to call it |
@denysdovhan I'm agree with that. If breaking change is an issue (I suppose it can be 😄), what about a group called Something like:
What do you think? |
We can release a breaking version — this is not a problem. It's relatively easy to check what we have in |
- New 'actions' option to override default button behavior - Old 'actions' option replaced by 'shortcuts' option - New waring message included for deprecated option (english and spanish only)
Hi @denysdovhan I tried to acomplish the proposed solution. Please let me know if you would like to change something or propose any change if needed 😉 |
Hi @denysdovhan Any news on this? I have been using this branch without problems for a while since our last conversation. |
If its not too big of a feature creep, could you maybe add the option to completely disable the default buttons? (I personally use only selected rooms cleaning which renders that button useless and only prone to misclicks) |
Thanks for contributing! |
# [2.0.0](v1.25.1...v2.0.0) (2021-11-05) ### Features * Default button actions overrides ([#183](#183)) ([1ac4d93](1ac4d93)) ### BREAKING CHANGES * `actions` are replaced with `shortcuts` Co-authored-by: Denys Dovhan <[email protected]>
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# 1.0.0 (2024-05-28) ### Bug Fixes * "Encontrar" replaced by "Localizar" as a more adequate translation ([649162c](649162c)) * add and translate missing states ([denysdovhan#231](https://github.com/cociweb/lawn-mower-card/issues/231)) ([8186565](8186565)) * Add image-rendering optimize-contrast in map ([denysdovhan#225](https://github.com/cociweb/lawn-mower-card/issues/225)) ([e020983](e020983)) * Add pt.json in localize.json ([denysdovhan#258](https://github.com/cociweb/lawn-mower-card/issues/258)) ([edf33ad](edf33ad)) * Add sources for German ([denysdovhan#210](https://github.com/cociweb/lawn-mower-card/issues/210)) ([7389324](7389324)) * Add state ""docked" in ru.json ([denysdovhan#205](https://github.com/cociweb/lawn-mower-card/issues/205)) ([93726f4](93726f4)) * Added states for Deebot N79; including auto, spot, and edge. ([denysdovhan#206](https://github.com/cociweb/lawn-mower-card/issues/206)) ([5b18b3f](5b18b3f)) * Adding missing status in HE & Fix status location for RTL languages ([denysdovhan#232](https://github.com/cociweb/lawn-mower-card/issues/232)) ([07ebe3e](07ebe3e)) * bump ha-template ([031bd3b](031bd3b)) * circular progress ([4263164](4263164)) * compact view menu ([5c30871](5c30871)) * Corrected a typo in polish translation ([denysdovhan#223](https://github.com/cociweb/lawn-mower-card/issues/223)) ([cf44a7a](cf44a7a)) * Czech translation update ([denysdovhan#324](https://github.com/cociweb/lawn-mower-card/issues/324)) ([0bf94d8](0bf94d8)) * **deps:** fix stale ha-tempalte bundle ([9548c11](9548c11)) * duplicated in localize ([ae5c993](ae5c993)) * Ensure getAttributes().status is always string ([denysdovhan#702](https://github.com/cociweb/lawn-mower-card/issues/702)) ([a25f254](a25f254)) * Fix `getCardSize()` ([denysdovhan#222](https://github.com/cociweb/lawn-mower-card/issues/222)) ([3e8c4fc](3e8c4fc)) * fix broken ui in editor ([3108530](3108530)) * fix dropdown overflow ([9c02c46](9c02c46)), closes [denysdovhan#365](https://github.com/cociweb/lawn-mower-card/issues/365) * fix german translation ([denysdovhan#283](https://github.com/cociweb/lawn-mower-card/issues/283)) ([777939a](777939a)) * Fix hovering labels for ha-icon-buttons ([denysdovhan#372](https://github.com/cociweb/lawn-mower-card/issues/372)) ([76780e4](76780e4)) * fix problem with ha-template dep ([e6154c7](e6154c7)) * fix toolbar icon centering ([0a53a02](0a53a02)) * HA 2022.3.x ([043b622](043b622)) * ha-button-icon issue ([denysdovhan#278](https://github.com/cociweb/lawn-mower-card/issues/278)) ([32dd911](32dd911)) * he translation ([denysdovhan#265](https://github.com/cociweb/lawn-mower-card/issues/265)) ([0e9c796](0e9c796)) * missing , in ru.json ([c627c85](c627c85)) * More keys for Ukrainian and English ([112072f](112072f)) * no implicit any ([429426e](429426e)) * not rendering falsy values in stats. fix [denysdovhan#373](https://github.com/cociweb/lawn-mower-card/issues/373) ([df278f9](df278f9)) * Polish translation ([denysdovhan#308](https://github.com/cociweb/lawn-mower-card/issues/308)) ([37c3bd0](37c3bd0)) * problem with replacing pkg version ([851f0a2](851f0a2)) * **readme:** Add notice about Ukraine ([03d4799](03d4799)) * regeneratorRuntime is not defined. fix [denysdovhan#374](https://github.com/cociweb/lawn-mower-card/issues/374) ([65382d3](65382d3)) * remove comment. triger semantic release ([218000b](218000b)) * remove some conditions for release ([7945494](7945494)) * Remove unused @semantic-release/changelog ([9638b30](9638b30)) * returning key translation in ru.json ([denysdovhan#209](https://github.com/cociweb/lawn-mower-card/issues/209)) ([e67c495](e67c495)) * Russian translation.json ([denysdovhan#285](https://github.com/cociweb/lawn-mower-card/issues/285)) ([c101dd8](c101dd8)) * Spanish translation ([denysdovhan#186](https://github.com/cociweb/lawn-mower-card/issues/186)) ([1a68059](1a68059)) * The websocket command 'camera_thumbnail' has been deprecated. ([denysdovhan#201](https://github.com/cociweb/lawn-mower-card/issues/201)) ([f4a5e97](f4a5e97)) * untranspiled ?? operator ([64c8f71](64c8f71)) * Update and add missing in pl.json ([denysdovhan#299](https://github.com/cociweb/lawn-mower-card/issues/299)) ([85b06e8](85b06e8)) * Update cs.json ([denysdovhan#368](https://github.com/cociweb/lawn-mower-card/issues/368)) ([84344c6](84344c6)) * Update fr with missing field ([denysdovhan#226](https://github.com/cociweb/lawn-mower-card/issues/226)) ([7e8273a](7e8273a)) * Update German translation ([denysdovhan#674](https://github.com/cociweb/lawn-mower-card/issues/674)) ([025e9d8](025e9d8)) * update german translations for deebot vacuums ([denysdovhan#305](https://github.com/cociweb/lawn-mower-card/issues/305)) ([d8d5261](d8d5261)) * Update he.json ([denysdovhan#219](https://github.com/cociweb/lawn-mower-card/issues/219)) ([0b9a473](0b9a473)) * Update hu.json ([denysdovhan#605](https://github.com/cociweb/lawn-mower-card/issues/605)) ([1a92e99](1a92e99)) * Update locate icon to be aligned with vacuum card ([denysdovhan#182](https://github.com/cociweb/lawn-mower-card/issues/182)) ([3e45131](3e45131)), closes [denysdovhan#136](https://github.com/cociweb/lawn-mower-card/issues/136) * Update ru.json ([denysdovhan#602](https://github.com/cociweb/lawn-mower-card/issues/602)) ([733ce63](733ce63)) * Update Ukrainian translation ([denysdovhan#262](https://github.com/cociweb/lawn-mower-card/issues/262)) ([a6aa0fe](a6aa0fe)) * Updated polish translation ([denysdovhan#734](https://github.com/cociweb/lawn-mower-card/issues/734)) ([b7559ea](b7559ea)) * Updated pt translation ([denysdovhan#672](https://github.com/cociweb/lawn-mower-card/issues/672)) ([763fa40](763fa40)) * Updates to Finnish (fi) translation ([denysdovhan#608](https://github.com/cociweb/lawn-mower-card/issues/608)) ([584e19f](584e19f)) * use corrent branch name in release workflow ([bd87a10](bd87a10)) * Use default lit element in postcss-lit ([0828c08](0828c08)) * wrap actions ([denysdovhan#208](https://github.com/cociweb/lawn-mower-card/issues/208)) ([9003941](9003941)) ### Features * Add @semantic-release/git for updating version in the repo ([4fa126d](4fa126d)) * add ability to combine attribute and entity_id in stats ([e9d8667](e9d8667)) * add image entities as map entities ([15353d3](15353d3)) * Add Japanese Translation ([denysdovhan#719](https://github.com/cociweb/lawn-mower-card/issues/719)) ([bcba901](bcba901)) * Add norsk nynorsk (Norwegian) ([denysdovhan#199](https://github.com/cociweb/lawn-mower-card/issues/199)) ([73288b6](73288b6)) * Add romanian language ([denysdovhan#242](https://github.com/cociweb/lawn-mower-card/issues/242)) ([a5096ab](a5096ab)) * Add semantic release ([22ef139](22ef139)) * Add Traditional Chinese ([denysdovhan#196](https://github.com/cociweb/lawn-mower-card/issues/196)) ([c1ad452](c1ad452)) * add translation to simplified chinese ([denysdovhan#321](https://github.com/cociweb/lawn-mower-card/issues/321)) ([f4b50d3](f4b50d3)) * Add Vietnamese ([denysdovhan#203](https://github.com/cociweb/lawn-mower-card/issues/203)) ([50e5fe6](50e5fe6)) * Added brazilian portuguese language support ([denysdovhan#336](https://github.com/cociweb/lawn-mower-card/issues/336)) ([7d9f04f](7d9f04f)) * Added Catalan translation ([denysdovhan#190](https://github.com/cociweb/lawn-mower-card/issues/190)) ([34de65a](34de65a)) * Added finnish translation ([denysdovhan#173](https://github.com/cociweb/lawn-mower-card/issues/173)) ([e6fc812](e6fc812)) * Added lithuanian translation ([denysdovhan#215](https://github.com/cociweb/lawn-mower-card/issues/215)) ([f35cbe2](f35cbe2)) * Default button actions overrides ([denysdovhan#183](https://github.com/cociweb/lawn-mower-card/issues/183)) ([1ac4d93](1ac4d93)) * Fix color compatibility and add templates ([denysdovhan#353](https://github.com/cociweb/lawn-mower-card/issues/353)) ([4a03d0d](4a03d0d)) * **i18n:** add actions_array warn in Ukrainan ([ad05f3c](ad05f3c)) * New translations added for ES. ([denysdovhan#271](https://github.com/cociweb/lawn-mower-card/issues/271)) ([690fb86](690fb86)) * print version in console ([0a7e447](0a7e447)) * provide value inside value_template ([7a44cc5](7a44cc5)) * run semantic-release on Ci ([c13cb7b](c13cb7b)) * Updated Ukrainian translation ([denysdovhan#264](https://github.com/cociweb/lawn-mower-card/issues/264)) ([fd218b0](fd218b0)) ### BREAKING CHANGES * `actions` are replaced with `shortcuts` Co-authored-by: Denys Dovhan <[email protected]>
This PR includes a new configuration option called start_action that can be used to define which service to call when the start button is pressed.
I have updated documentation file too.
This can solve issue #158