peribeir / homeassistant-rademacher

This custom integration provides access to Rademacher Devices connected to a HomePilot (or Start2Smart) bridge.
GNU General Public License v3.0
56 stars 11 forks source link

Cover Position #24

Closed jproveta closed 2 years ago

jproveta commented 2 years ago

Hi Pedro,

Acho que é Português, mas vou escrever em Inglês.

In the case of shutters (cover), is it not possible to invert the percentage? in the HomePilot system, for example, it appears 70% and in the HA it appears 30%.

Thanks, JP

peribeir commented 2 years ago

Hi JP,

Sim, sou Português, é bom saber que há Portugueses a utilizar este componente :)

Now in English. The meaning of 0% and 100% in HA is inverted to the one from HomePilot. This is the way HA interprets the value, 0% is closed and 100% is open (while on HomePilot it is the other way around). For this reason I cannot change this behavior, because if I did, then opened and closed would be switched. Actually I needed to do the inversion in the component itself in order for HA to have expected behavior.

Cumprimentos, Pedro

MrWeidenMr commented 2 years ago

Hi @all!

Perhaps it is possible to create a entity or attribute named "cover_position_reverse" with the reversed state. Then you could integrate it for example with the lovlace-slider-entity-row or you could show the revers state in lovelace.

jproveta commented 2 years ago

Hi JP,

Sim, sou Português, é bom saber que há Portugueses a utilizar este componente :)

Now in English. The meaning of 0% and 100% in HA is inverted to the one from HomePilot. This is the way HA interprets the value, 0% is closed and 100% is open (while on HomePilot it is the other way around). For this reason I cannot change this behavior, because if I did, then opened and closed would be switched. Actually I needed to do the inversion in the component itself in order for HA to have expected behavior.

Cumprimentos, Pedro

Thanks, Obrigado pelo teu trabalho.

hklages commented 2 years ago

You can use the template platform to create new sensors with (100% - position | int). To change the position you can use scripts and do the same there.

I prefer the settings in this integration (in contradiction to HomePilot setting) as it teams well with lovelace cards "custom:slider-button-card"/"grid card":

cover_small

peribeir commented 2 years ago

You can use the template platform to create new sensors with (100% - position | int). To change the position you can use scripts and do the same there.

I prefer the settings in this integration (in contradiction to HomePilot setting) as it teams well with lovelace cards "custom:slider-button-card"/"grid card":

cover_small

Right, that's the question with inverting the value. All cards are assuming how HA interprets the value, and doing it the other way around would definitely show incorrect info in lovelace. But as you suggested, people can always add entities using template platform. There's even a cover template that you can use, but I doubt it will work completely as expected.

jproveta commented 2 years ago

Thank you, Obrigado.

JP

------ Mensagem original ------ De: "Pedro Ribeiro" @.> Para: "peribeir/homeassistant-rademacher" @.> Cc: "jproveta" @.>; "Author" @.> Enviado(s): 13-02-2022 14:56:40 Assunto: Re: [peribeir/homeassistant-rademacher] Cover Position (Issue

24)

You can use the template platform to create new sensors with (100% - position | int). To change the position you can use scripts and do the same there.

I prefer the settings in this integration (in contradiction to HomePilot setting) as it teams well with lovelace cards "custom:slider-button-card"/"grid card":

cover_small https://user-images.githubusercontent.com/17273119/153560360-d2bc9dda-af06-4f6f-b500-6af134cf691f.png

Right, that's the question with inverting the value. All cards are assuming how HA interprets the value, and doing it the other way around would definitely show incorrect info in lovelace. But as you suggested, people can always add entities using template platform. There's even a cover template that you can use, but I doubt it will work completely as expected.

— Reply to this email directly, view it on GitHub https://github.com/peribeir/homeassistant-rademacher/issues/24#issuecomment-1038174561, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACKTJUPUXNOVM33NBPJMZXDU27BCRANCNFSM5N6AWYZA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>