sander1988 / Indego

Home Assistant Custom Component for Bosch Indego Lawn Mower
Apache License 2.0
92 stars 29 forks source link

Feature/lawn mower entity #216

Closed dereisele closed 3 months ago

dereisele commented 3 months ago

Add Lawn Mower Entity

Home Assistant has a native lawn mower entity since version 2023.9 so I quickly added it. It is based on the vacuum entity. The state mapping reflects the husqvarna implementation.

image

sander1988 commented 3 months ago

@dereisele - Thank you for your work! Makes sense to use the mower base entity here now it's available in HA.

Instead of coping everything, can you just change the vacuum to mower?

There is no reason anymore to keep the vacuum, we can drop that support now.

dereisele commented 3 months ago

Hi, I would keep the vacuum entity for now, because it's supported by the Google Assistant integration, but the lawn mower isn't.

The largest non-specific copy-paste is the state mapping. Maybe it could be moved to the mix-in Indego Entity.

sander1988 commented 3 months ago

I would keep the vacuum entity for now, because it's supported by the Google Assistant integration, but the lawn mower isn't.

Ok, that's a good argument to keep it to prevent breaking things. I think we should make it configurable... expose it as vacuum, mower or none.

I will have a look at your code soon and try to merge it.

sander1988 commented 3 months ago

I will be merging it in a separate branch for now. I want to make some additional changes before merging it in the main develop branch.

dereisele commented 3 months ago

Nice, comment here if you need any help

sander1988 commented 3 months ago

It has been merged, optimized and made configurable. It's now on the develop branch.

Nice, comment here if you need any help Can you test it?

Expose as 'mower' or 'vacuum' if now configurable. Both disabled by default. This can be enabled through the integration configuration panel.

sander1988 commented 3 months ago

@wimb0 - I noticed you have added the PL translations some time ago. Some translations are now missing due to new functionality. Any chance you can add the new translations?

wimb0 commented 3 months ago

Maybe @zmechu can help with the Polish translations. He is the one who did the translation. @sander1988 Is Dutch already up-to-date, if not I can add these.?

zmechu commented 3 months ago

Maybe @zmechu can help with the Polish translations. He is the one who did the translation. @sander1988 Is Dutch already up-to-date, if not I can add these.?

Sure! Which file should be translated?

wimb0 commented 3 months ago

I think this one: https://github.com/jm-73/Indego/blob/lawn-mower-entity-feature/custom_components/indego/translations/pl.json Seems like EN (and NL) is already translated, so you can use https://github.com/jm-73/Indego/blob/lawn-mower-entity-feature/custom_components/indego/translations/en.json as source for what needs to be translated.

zmechu commented 3 months ago

I think this one: https://github.com/jm-73/Indego/blob/lawn-mower-entity-feature/custom_components/indego/translations/pl.json Seems like EN (and NL) is already translated, so you can use https://github.com/jm-73/Indego/blob/lawn-mower-entity-feature/custom_components/indego/translations/en.json as source for what needs to be translated.

Done, please take a look if all is OK.

urbatecte commented 3 months ago

Hi there, will perform french translation tonight. If I remember well, some error code was provided in HA UI, is there any file to transcript as well ?

Cheers


From: zmechu @.> Sent: Monday, May 27, 2024 1:56:34 PM To: jm-73/Indego @.> Cc: Subscribed @.***> Subject: Re: [jm-73/Indego] Feature/lawn mower entity (PR #216)

I think this one: https://github.com/jm-73/Indego/blob/lawn-mower-entity-feature/custom_components/indego/translations/pl.json Seems like EN (and NL) is already translated, so you can use https://github.com/jm-73/Indego/blob/lawn-mower-entity-feature/custom_components/indego/translations/en.json as source for what needs to be translated.

Done, please take a look if all is OK.

— Reply to this email directly, view it on GitHubhttps://github.com/jm-73/Indego/pull/216#issuecomment-2133323398, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AI4MVOQTQP5ZWMRL3GQHO2DZEMNPFAVCNFSM6AAAAABH6WHDCOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZTGMZDGMZZHA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

kimzeuner commented 3 months ago

Do you mean the alert description and headline ? image image

urbatecte commented 3 months ago

Yes 👍


From: kizeu @.> Sent: Monday, May 27, 2024 3:13:22 PM To: jm-73/Indego @.> Cc: urbatecte @.>; Comment @.> Subject: Re: [jm-73/Indego] Feature/lawn mower entity (PR #216)

Do you mean the alert description and headline ? 31BF047C-C2B4-4AAF-B026-0CDD846D2A1B.jpeg (view on web)https://github.com/jm-73/Indego/assets/116279616/2badd5b6-00be-4e9d-afb2-30420ebaaa05 1EB77C24-8EF9-4392-90C7-017F369241AC.png (view on web)https://github.com/jm-73/Indego/assets/116279616/d6d7a102-6d0b-44e0-b029-007fd3128ccb

— Reply to this email directly, view it on GitHubhttps://github.com/jm-73/Indego/pull/216#issuecomment-2133460025, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AI4MVOVBZLQ5FKMKGDTUMILZEMWPFAVCNFSM6AAAAABH6WHDCOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZTGQ3DAMBSGU. You are receiving this because you commented.Message ID: @.***>

kimzeuner commented 3 months ago

Ok, at the moment it is not possible because some codes have to be added first but im working on it and hope to finish it tomorrow. I will write anpther PR and let you know when im done so you can start working on your additional translations 😉

urbatecte commented 3 months ago

Great 😎


From: kizeu @.> Sent: Monday, May 27, 2024 4:25:54 PM To: jm-73/Indego @.> Cc: urbatecte @.>; Comment @.> Subject: Re: [jm-73/Indego] Feature/lawn mower entity (PR #216)

Ok, at the moment it is not possible because some codes have to be added first but im working on it and hope to finish it tomorrow. I will write anpther PR and let you know when im done so you can start working on your additional translations 😉

— Reply to this email directly, view it on GitHubhttps://github.com/jm-73/Indego/pull/216#issuecomment-2133593740, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AI4MVOXKY3LHA6K44HL2DGDZEM67FAVCNFSM6AAAAABH6WHDCOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZTGU4TGNZUGA. You are receiving this because you commented.Message ID: @.***>

urbatecte commented 3 months ago

@kimzeuner I'm not used to make PR :-( Please find here attached my translation for french Thanks a lot for your job guys !

fr.json

kimzeuner commented 3 months ago

Good morning guys, i have added the translations for the entities "Alert Description", "Alert Headline", "Mower State" and "Mower State Detail". Can you please have a look to the translation files here and change it where needed ?! i left the new lines, where you have to make your changes, blank so you only have to insert the correct translation between the " ". @zmechu i have added the translation for the services in the pl.json file in the link above so they need to be translated too ;)

Please let me know when you have finished the translations and i will create the PR for that.

One additional request: While you are translating the texts, could you please have a look if the list of possible alerts and mower states is complete ? Unfortunately i have not found a complete list of all possible messages, that's why I could only use the ones that I have encountered so far.

Thanks a lot!

urbatecte commented 3 months ago

Hi @kimzeuner ,

Here is my french translation file. fr.json

It seems that some alert message are missing. In my app, I still have kind of: Mower stopped by an obstacle Check blades Mower immobile (different status than mower stucked, wheel still running but fixed position) Connection to docking station not possible Mower too slopped/inclined

Cheers

sander1988 commented 3 months ago

I think there is no need to translate alert messages. They are returned by the API in the language of the account. I just tested it, I get my alerts in my native language (Dutch).

What I see:

sander1988 commented 3 months ago

And note that code (including alerts) is still being optimized and might change a bit before the release.

kimzeuner commented 3 months ago

Correct, i saw the same (alert message in native language) in my system, thats why i have not translated them. Should i wait with a PR for the translations until you have finished optimizations ?

sander1988 commented 3 months ago

Correct, i saw the same (alert message in native language) in my system, thats why i have not translated them. Should i wait with a PR for the translations until you have finished optimizations ?

I recommend it, I'm nearly done optimizing the alert part, will commit it when complete. I will also open a separate issue for translations when ready. It's not really related to this PR, so a bit confusing.

sander1988 commented 3 months ago

Please provide all translation updates in a PR or file in issue #221. Thank you! Note that I just pushed an update to the develop branch requiring more translations ;-)