Skip to content
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

Cover possible improvements #64

Closed
bruxy70 opened this issue Aug 6, 2019 · 4 comments
Closed

Cover possible improvements #64

bruxy70 opened this issue Aug 6, 2019 · 4 comments

Comments

@bruxy70
Copy link

bruxy70 commented Aug 6, 2019

Thanks for adding the attribute for tilt. This is awesome!

I have 3 more suggestions for your consideration (not sure if this is the right forum, but I did not find other channel)

  • Would it make sense to allow to "reverse" the slider, so that it is fully extended in 100% or closed position? I am aware that it goes against the home assistant standard, but if you look a picture of roller shutters, the way the standard slider works makes no sense. It would make much more sense for the slider to be "retracted" when the shutter is "open", and "extended" when the shutter is "closed" (whilst the standard is retracted for closed, extended for open). I just can't get used to it.
  • The full_row option allows hiding both the name and the icon. Would it make sense to separate the two? E.g. to only show the icon, but not the name (or vice versa)?
  • When using the attribute, it shows the same icon as the position. If I add both next to each other, it is not obvious which is which. Would it make sense to allow configuring a custom icon (or custom title)?

Thanks for your great contribution!

@thomasloven
Copy link
Owner

  • You can probably wrap that in a template cover to create a new one that works backwards.
  • I don't think that would be worth the ammount of work required. That part of the row uses the built-in entity-row, so I'd have to modify that too to remove the space left by the name.
    You could just add name: " " to leave it blank, though.
  • Did you try it?

@bruxy70
Copy link
Author

bruxy70 commented Aug 6, 2019

@thomasloven , I've tried to re-map the cover, but could not find a way to do that. When I reverse the position, it will screw up the arrows that close and open the cover. It will disable the wrong arrow button at the open/closed position. I've also tried to map closed and open position to different values, but could not find a working combination. I made a custom card that I use right now. But it is not written well (so I did not even share it), and yours is much better.
image

Never mind, will keep using mine.
Thanks for trying to help anyhow.

@thomasloven
Copy link
Owner

thomasloven commented Aug 7, 2019

Works for me...

cover:
  - platform: template
    covers:
      backwards:
        position_template: "{{ 100 - (state_attr('cover.window', 'current_position')|float) }}"
        set_cover_position:
          - service: cover.set_cover_position
            data_template:
              entity_id: cover.window
              position: {{ 100 - position }}

0xUiEQBWOp

Just use the original one for the arrows, and the backwards one for the slider.

@bruxy70
Copy link
Author

bruxy70 commented Aug 7, 2019

Thanks, this is close
image
The first row is my custom controls, the second row lovelace-slider-entity. Left one full row, right one not.
I used custom:cover-element for the buttons up and down - had to use the actual mqtt cover, as in the template you cannot specify value and position at the same time, and it always assumes 100 is open (which is also why it does not show the buttons up and down when I define the position).
And I also used position with the actual mqtt cover, as the template does not do tilt. So I am combining both.
I think it is quite cumbersome, but I guess it would be an acceptable workaround if it works.
The full row looks almost ok, except that it does not say which one is position and which tilt - I guess one can live with that.
The second one does not look good. Even id I set friendly_name empty, it will leave a gap. And this does not work for the tilt, as I cannot set an empty name for mqtt cover (and template does not support tilt).
Suppose I can make it bigger and make the tithe descriptive, but from the two, I'd go for full row,

Anyhow, I will keep experimenting and keep mine for the time being,

I appreciate that I might be the only one with this set-up, so I will keep it for myself. But if you change your mind over time and come to the conclusion that it might be useful to somebody else, let me know. I will try to fork it and add this as an option (rather than trying to publish mine, which would not make sense). (This is why I posted this in the first place)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants