rianadon / opensprinkler-card

Home Assistant card for collecting OpenSprinkler status
Other
66 stars 8 forks source link

Supporting additional parameters of numberbox-card #7

Closed thisisbenwoo closed 3 years ago

thisisbenwoo commented 3 years ago

Amazing update in v1.6!!

I tried to make my card a little more colorful by using additional parameters from the numberbox-card. So my code editor now shows:

device: <device_id>
name: Sprinklers
hide_disabled: true
bars:
  bar_foreground: green
  icon: hass:sprinkler
  active_icon: hass:sprinkler-variant
input_number:
  entity: input_number.slider
  type: custom:numberbox-card
  unit: m
  icon: mdi:timelapse
  **icon_plus: mdi:chevron-up
  icon_minus: mdi:chevron-down**
extra_entities:
  - Zones
  - sensor.curb_station_status
  - sensor.front_yard_station_status
  - sensor.side_yard_station_status
  - sensor.s_flower_bed_station_status

I took these parameters from the numberbox-card README.md (see the section entitled Examples) where it shows the following (relevant part of the) code:

    type: 'custom:numberbox-card'
    icon_plus: 'mdi:chevron-up'
    icon_minus: 'mdi:chevron-down'
    style: |
      .cur-num{font-size:25px !important}
      .cur-unit{color:orange; font-size:100% !important; opacity:1 !important}
      .grid-left{color:red}
      .grid-right{color:blue}

However, the opensprinkler-card doesn't seem to want to honor the icon_plus or icon_minus parameters. See my screenshot below: image

I need a little more time, but I can't wait to style the card further, using your timer-bar-card integration.

rianadon commented 3 years ago

Thank you! Unless I am mistaken, the icons for the input_number did change: they default to - / + but now you have V / ^ icons. The styling didn't come through, and when I try creating a new card based on that example from README.md the styling doesn't show up either. So perhaps we are both missing some other required dependency for the styling.

Also the numberbox-card confusingly does not update when using the visual/yaml editor (you have to save changes to see the new icons). I opened an issue there so hopefully that gets fixed.

thisisbenwoo commented 3 years ago

👍


Ben Woo +1 (212) 724-1188

On Sat, Jun 26, 2021, 15:16 rianadon @.***> wrote:

Thank you! Unless I am mistaken, the icons for the input_number did change: they default to - / + but now you have V / ^ icons. The styling didn't come through, and when I try creating a new card based on that example from README.md the styling doesn't show up either. So perhaps we are both missing some other required dependency for the styling.

Also the numberbox-card confusingly does not update when using the visual/yaml editor (you have to save changes to see the new icons). I opened an issue there so hopefully that gets fixed.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rianadon/opensprinkler-card/issues/7#issuecomment-869056685, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK6CPPJFA5DK7FEKH3SF3TLTUYYQ7ANCNFSM47LURJYQ .

rianadon commented 3 years ago

Closing since it doesn't look to me like there's a problem with the card. Please reopen if I'm mistaken.