phrz / lg-washer-dryer-card

Lovelace cards for use with the Home Assistant LG ThinQ Integration
MIT License
298 stars 56 forks source link

[BUG] 7segment font not used in iOS #30

Closed dbell68 closed 1 year ago

dbell68 commented 1 year ago

Describe the bug The washer and dryer cards are working fine except when viewing the card in the Home Assistant app for my iOS device, the 7segment font used for the timer display is not used; seems like just a regular font. Works fine in both desktop and microsoft edge for iOS browsers, and even though the font is incorrect, the remaining time does display correctly.

What I have tried (required)

Screenshots Sensors: washer_states

HA iOS App Cards HA_iOS-Cards

HA Desktop Browser App Cards HA_Desktop_Cards

iOS MS Edge Cards iOS_MSEdge_Cards

Template Configuration

- name: washer_door_lock
    #friendly_name: "Washer Door Lock"
    state: "{{ state_attr('sensor.washer','child_lock') }}"

  - name: washer_time_display
    #friendly_name: "Washer Time Display"
    state: >
      {% if is_state('sensor.washer_run_state', '-') %}
      {% elif is_state('sensor.washer_run_state', 'unavailable') %}
      {% elif is_state('sensor.washer_run_state', 'Standby') %}
        -:--
      {% else %}
        {{ state_attr("sensor.washer","remain_time").split(":")[:-1] | join(':') }}   
      {% endif %}

  - name: dryer_time_display
    #friendly_name: "Dryer Time Display"
    state: >
        {% if is_state('sensor.dryer_run_state', '-') %}
        {% elif is_state('sensor.dryer_run_state', 'unavailable') %}
        {% elif is_state('sensor.dryer_run_state', 'Standby') %}
          -:--
        {% else %}
          {{ state_attr("sensor.dryer","remain_time").split(":")[:-1] | join(':') }}
        {% endif %}

  - name: blank
    #friendly_name: "Blank Sensor"
    state: ""

Card Configuration

type: picture-elements
elements:
  - type: image
    entity: sensor.washer_run_state
    image: /hacsfiles/lg-wash-dry-card/lg-icons/sensing.png
    state_image:
      Detecting: /hacsfiles/lg-wash-dry-card/lg-icons/sensing-on.png
    style:
      top: 33%
      left: 33%
      width: 20%
      image-rendering: crisp
  - type: image
    entity: sensor.washer_run_state
    image: /hacsfiles/lg-wash-dry-card/lg-icons/wash.png
    state_image:
      Washing: /hacsfiles/lg-wash-dry-card/lg-icons/wash-on.png
    style:
      top: 33%
      left: 51%
      width: 20%
      image-rendering: crisp
  - type: image
    entity: sensor.washer_run_state
    image: /hacsfiles/lg-wash-dry-card/lg-icons/rinse.png
    state_image:
      Rinsing: /hacsfiles/lg-wash-dry-card/lg-icons/rinse-on.png
    style:
      top: 33%
      left: 69%
      width: 20%
      image-rendering: crisp
  - type: image
    entity: sensor.washer_run_state
    image: /hacsfiles/lg-wash-dry-card/lg-icons/spin.png
    state_image:
      Spinning: /hacsfiles/lg-wash-dry-card/lg-icons/spin-on.png
    style:
      top: 33%
      left: 87%
      width: 20%
      image-rendering: crisp
  - type: image
    entity: sensor.washer
    image: /hacsfiles/lg-wash-dry-card/lg-icons/wifi.png
    state_image:
      'on': /hacsfiles/lg-wash-dry-card/lg-icons/wifi-on.png
    style:
      top: 73%
      left: 32%
      width: 10%
      image-rendering: crisp
  - type: image
    entity: sensor.washer_door_lock
    image: /hacsfiles/lg-wash-dry-card/lg-icons/lock.png
    state_image:
      'on': /hacsfiles/lg-wash-dry-card/lg-icons/lock-on.png
    style:
      top: 73%
      left: 45%
      width: 10%
      image-rendering: crisp
  - type: state-label
    entity: sensor.blank
    prefix: '18:88'
    style:
      color: '#555'
      font-family: segment7
      font-size: 50px
      left: 95%
      top: 74%
      transform: translate(-100%,-50%)
  - type: state-label
    entity: sensor.washer_time_display
    style:
      color: '#8df427'
      font-family: segment7
      font-size: 50px
      left: 95%
      top: 74%
      transform: translate(-100%,-50%)
image: /hacsfiles/lg-wash-dry-card/hass-washer-alt-card-bg.png
phrz commented 1 year ago

Hi, pardon the delay in responding, have you tried resetting your cache in the iOS mobile app?

dbell68 commented 1 year ago

Hi - thanks so much for the reply. Looks like Settings > Companion App > Debugging > Reset Frontend Cache resolved it. Not sure how I hadn't discovered that option already :)