core icon indicating copy to clipboard operation
core copied to clipboard

Values for Recording mode and Infrared mode entities are now showing correctly

Open cholywell opened this issue 1 year ago • 1 comments

The problem

Values for entities Infrared mode and Recording mode and not showing correctly. Values for Infrared mode are showing as "IRLEDMode.AUTO" rather than "Auto". Recording mode is showing as "RecordingMode.ALWAYS" rather than "Always".

What version of Home Assistant Core has the issue?

2024.10.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Unifi Protect

Link to integration documentation on our website

https://www.home-assistant.io/integrations/unifiprotect/

Diagnostics information

config_entry-unifiprotect-01J9WJ69YY69V7C84KZGE71TR3.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

cholywell avatar Oct 13 '24 01:10 cholywell

@cholywell Does the issue still persist with the current HA version? It's working for me: image

RaHehl avatar Nov 22 '24 22:11 RaHehl

Screenshot 2024-11-22 at 5 16 18 PM

@RaHehl I'm on 2024.11.2 and it's still broken.

cholywell avatar Nov 22 '24 23:11 cholywell

@cholywell Does the issue also occur in the browser's incognito mode?

RaHehl avatar Nov 22 '24 23:11 RaHehl

@cholywell "Does the issue also occur in the browser's incognito mode?"

After comparing your screenshot I found the problem. The local user that the Home Assistant integration uses on Protect was set to "View Only". Once I set it to "Full Management" and reloaded the integration it fixed everything. Not that I want to be able to modify things on the CloudKey via Home Assistant but at least I know whats wrong now.

Screenshot 2024-11-22 at 5 23 50 PM

cholywell avatar Nov 22 '24 23:11 cholywell

Ah yes, the 'view only' aspect is a good point. With 'view only' permissions, sensor.py provides the values, while with write permissions, select.py is used, which references the appropriate enum to correctly map the values. However, this mapping seems to be missing in the 'view only' variant. image image

RaHehl avatar Nov 22 '24 23:11 RaHehl