sleevezipper / hass-workstation-service

Provide useful sensors and services from your workstation to Home Assistant.
Apache License 2.0
615 stars 53 forks source link

ActiveWindowSensor shows COD title wrong #93

Closed VNRARA closed 3 years ago

VNRARA commented 3 years ago

ActiveWindowSensor shows Call Of Duty Modern Warfare / Warzone as

?C?a?l?l? ?o?f? ?D?u?t?y?®?:? ?M?o?d?e?r?n? ?W?a?r?f?a?r?e?®??????????????????????????????????????????????????????????????????? And I copied this exact string into HA but it won't work for some reason. It used to work just fine yesterday and it still does for say Apex Legends and even after re-copying the string from HA dev tools it doesn't work.

sleevezipper commented 3 years ago

I'm copying your own workaround from Discord here:

template:
  sensor:
    - name: Current Window Fixed
      state: '{{ states("sensor.focussedwindow").replace("?" , "")|replace("®", "") }}'

I believe this will be good enough for now. I may reopen this later if more application titles cause the same problem.