Skip to content

Commit

Permalink
Breaking Change: Make coordinate attributes all lower case for HA com…
Browse files Browse the repository at this point in the history
…patibility (#2341)

* Make coordinate attributes all lower case for HA compatibility

* Make rest of sensor attributes match expected casing
  • Loading branch information
dshokouhi committed Mar 6, 2022
1 parent ad57b00 commit eae2c6e
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ class GeocodeSensorManager : SensorManager {
}
val attributes = address?.let {
mapOf(
"Administrative Area" to it.adminArea,
"Country" to it.countryName,
"ISO Country Code" to it.countryCode,
"Locality" to it.locality,
"Latitude" to it.latitude,
"Longitude" to it.longitude,
"Postal Code" to it.postalCode,
"Sub Administrative Area" to it.subAdminArea,
"Sub Locality" to it.subLocality,
"Sub Thoroughfare" to it.subThoroughfare,
"Thoroughfare" to it.thoroughfare
"administrative_area" to it.adminArea,
"country" to it.countryName,
"iso_country_code" to it.countryCode,
"locality" to it.locality,
"latitude" to it.latitude,
"longitude" to it.longitude,
"postal_code" to it.postalCode,
"sub_administrative_area" to it.subAdminArea,
"sub_locality" to it.subLocality,
"sub_thoroughfare" to it.subThoroughfare,
"thoroughfare" to it.thoroughfare
)
}.orEmpty()

Expand Down

0 comments on commit eae2c6e

Please sign in to comment.