mtgeekman / Home_Assistant_NeoSmartBlinds

Adds NeoSmart Blinds support to Home-Assistant.
44 stars 14 forks source link

HA buttons grey out ability to raise or lower when HA thinks the blinds are up/down. #43

Open sco0ts opened 1 year ago

sco0ts commented 1 year ago

I have blinds that do not report their position back to HA. After you press Up in HA, the UP button is greyed out. So, if you hit down from the RF remote that came with the blinds, you are are not not able to raise the blinds from HA. Is there any way to fix this so that HA does not try and assume position? or is there a way to actually get the accurate position back from the blinds?

This also creates complication with groups of blinds and then the individual blinds.

mtgeekman commented 1 year ago

Currently there is no way for us to be able to keep track of the actual position of the blinds. This is a limitation by the hub/blinds and there is no work around.

sco0ts commented 1 year ago

Is there any way to ask HA to not grey out the UP or DOWN buttons ever?

On Mon, Jun 12, 2023 at 10:02 AM Mike Knudson @.***> wrote:

Currently there is no way for us to be able to keep track of the actual position of the blinds. This is a limitation by the hub/blinds and there is no work around.

— Reply to this email directly, view it on GitHub https://github.com/mtgeekman/Home_Assistant_NeoSmartBlinds/issues/43#issuecomment-1587404278, or unsubscribe https://github.com/notifications/unsubscribe-auth/AITOTZQJ6LIWBJD3BUQKGIDXK4OPBANCNFSM6AAAAAAZDNV3IQ . You are receiving this because you authored the thread.Message ID: @.***>

mtgeekman commented 1 year ago

I'm not certain, but can look into it.

gee-jay-bee commented 1 year ago

Regarding groups, if they are configured in home assistant you can use parent_group to map a group code to a set of blinds. If you control the group in HA, the command is issued to the group code rather than the individual.

Unfortunately, there's no way of dealing with control outside of HA. If my HA position gets out of sync, I issue a command (up or down) to force the blind to the opposite extreme position and then it is back in sync. We don't use our remotes, wverything is done via automations or HomeKit so we only really get out of sync when the battery is low!

mohbd commented 1 year ago

I had the same requirement so I hard-coded the functionality to keep HA from greying out the buttons. I also modified it to remove the tilt buttons as I didn't want to see them. Changes can be seen on my own fork of this project here: https://github.com/mtgeekman/Home_Assistant_NeoSmartBlinds/commit/d85fed65aaff5bd2605d69e1eb9c81ead5d22e21

Basically, if the current_cover_position always returns 50, it will allow you to press either the open/close buttons. The solution could be made configurable per blind, but unfortunately I don't have the time to figure that out.

Hope you find this useful.

sco0ts commented 1 year ago

I had the same requirement so I hard-coded the functionality to keep HA from greying out the buttons. I also modified it to remove the tilt buttons as I didn't want to see them. Changes can be seen on my own fork of this project here: d85fed6

Basically, if the current_cover_position always returns 50, it will allow you to press either the open/close buttons. The solution could be made configurable per blind, but unfortunately I don't have the time to figure that out.

Hope you find this useful.

This is very clever. thank you! I notice that now all the entities are separate buttons. Is there a way to get it all back as a cover so that I can utilize a 'custom:mushroom-cover-card' ?

I can alternatively make button cards.

I did notice only one of my blinds (the parent of two blinds) has a stop button. Did you notice this as well?

mohbd commented 1 year ago

I have added 8 blinds individually and 1 grouping using the room code so HA just see's that as an additional cover entity. I have not noticed what you have mentioned, I was simply able to add "custom:mushroom-cover-card" cards for all of the entities and this displays up stop and down buttons for each.

It's also important to note that if you set a close_time when configuring the blinds, it will grey out the selected button for that amount of time as the blind is considered to be moving in that direction already for the time specified.

sco0ts commented 1 year ago

I have added 8 blinds individually and 1 grouping using the room code so HA just see's that as an additional cover entity. I have not noticed what you have mentioned, I was simply able to add "custom:mushroom-cover-card" cards for all of the entities and this displays up stop and down buttons for each.

It's also important to note that if you set a close_time when configuring the blinds, it will grey out the selected button for that amount of time as the blind is considered to be moving in that direction already for the time specified.

I actually got it all confused. The buttons were brought in by another integration.

My actual finding is that the entities are not created by neo after swapping out your python file. Are there any additional things i need to do other than replace 'cover.py' in the '\custom_components\neosmartblinds' folder?

I used the file here: https://github.com/mtgeekman/Home_Assistant_NeoSmartBlinds/blob/d85fed65aaff5bd2605d69e1eb9c81ead5d22e21/cover.py

Then I just tried to make the few line changes myself in the 'cover.py'. The entities showed back up but they would still grey out when they were thought by HA to be in the closed or opened position.

mohbd commented 1 year ago

My normal way of doing things is to manually make the changes to the file and then restart HA from the UI. After that they should appear as normal and the buttons should only grey out for a short time after pressing one.