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

Button spacing #41

Open
emeyedeejay opened this issue Oct 29, 2022 · 2 comments
Open

Button spacing #41

emeyedeejay opened this issue Oct 29, 2022 · 2 comments

Comments

@emeyedeejay
Copy link

Love this custom button!

Is it possible to correct the spacing when one button shows for "on" and one for "off"? When the state changes, the spacing is not correct. The "gate is open" button moves down and then the spacing above the red button is too big and below is too small.

221030001710-Sharex screenshot

@emeyedeejay
Copy link
Author

YAML for above:

square: false
columns: 1
type: grid
cards:
  - type: custom:button-text-card
    large: true
    entity: binary_sensor.kitchen_gate_monitor_contact
    title: Kitchen gate closed
    background_color: '#007000'
    font_color: '#ffffff'
    icon: mdi:gate
    icon_size: 48
    hide_condition: |
      [[[ return entity.state === "on" ]]]
  - type: custom:button-text-card
    large: true
    entity: binary_sensor.kitchen_gate_monitor_contact
    title: Kitchen gate open
    background_color: '#d2222d'
    font_color: '#ffffff'
    icon: mdi:gate-alert
    icon_size: 48
    hide_condition: |
      [[[ return entity.state === "off" ]]]
  - type: custom:button-text-card
    large: true
    entity: binary_sensor.lounge_gate_monitor_contact
    title: Lounge gate closed
    background_color: '#007000'
    font_color: '#ffffff'
    icon: mdi:gate
    icon_size: 48
    hide_condition: |
      [[[ return entity.state === "on" ]]]
  - type: custom:button-text-card
    large: true
    entity: binary_sensor.lounge_gate_monitor_contact
    title: Lounge gate open
    background_color: '#d2222d'
    font_color: '#ffffff'
    icon: mdi:gate-alert
    icon_size: 48
    hide_condition: |
      [[[ return entity.state === "off" ]]]
  - type: custom:button-text-card
    large: true
    entity: binary_sensor.drive_gate_monitor_contact
    title: Drive gate closed
    background_color: '#007000'
    font_color: '#ffffff'
    icon: mdi:gate
    icon_size: 48
    hide_condition: |
      [[[ return entity.state === "on" ]]]
  - type: custom:button-text-card
    large: true
    entity: binary_sensor.drive_gate_monitor_contact
    title: Drive gate open
    background_color: '#d2222d'
    font_color: '#ffffff'
    icon: mdi:gate-alert
    icon_size: 48
    hide_condition: |
      [[[ return entity.state === "off" ]]]
  - type: custom:button-text-card
    large: true
    entity: binary_sensor.garage_door_monitor_contact
    title: Garage door closed
    background_color: '#007000'
    font_color: '#ffffff'
    icon: mdi:gate
    icon_size: 48
    hide_condition: |
      [[[ return entity.state === "on" ]]]
  - type: custom:button-text-card
    large: true
    entity: binary_sensor.garage_door_monitor_contact
    title: Garage door open
    background_color: '#d2222d'
    font_color: '#ffffff'
    icon: mdi:gate-alert
    icon_size: 48
    hide_condition: |
      [[[ return entity.state === "off" ]]]

@Savjee
Copy link
Owner

Savjee commented Nov 27, 2022

Thanks for your detailed bug report!
It took me a while to get around to fixing this. But I did manage to come up with a solution.

Try installing v0.6.2. It should fix the issue.

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