I have an AIS receiver and plot the maximum range that I can detect vessels, however this is returned from the unit in Nautical Miles (1,852m) and HA doesn’t accept this as a valid device class
ValueError: Sensor sensor.ais_catcher_max_range_last_hour has device class ‘distance’, state class ‘None’ unit ‘nmi’ and suggested precision ‘None’ thus indicating it has a numeric value; however, it has the non-numeric value: ‘None’ (<class ‘str’>)
Given that speed is already allowed in knots (kn) which are equal to 1NM per hour, this seems like an oversight.
Acceptable abbreviations for Nautical Mile include (NM - uppercase to distinguish from nanometers), nmi or possibly ‘M’ but I figure the last one could be easily confused with metre or statute miles.