Skip to content

Commit

Permalink
Update sensor.py
Browse files Browse the repository at this point in the history
Add integer to approved value
  • Loading branch information
kayjei authored Feb 3, 2021
1 parent 8d6220b commit 26c3cf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/badtemp_karlskrona/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
lon = str(json["geometryArea"]["x"])
timestamp = datetime.datetime.strptime(str(json["timeStamp"]).split('.')[0], "%Y-%m-%dT%H:%M:%S")

if isinstance(temp, float):
if isinstance(temp, float) or isinstance(temp, int):
devices.append(SensorDevice(id, temp, lat, lon, timestamp, name))
_LOGGER.info("Adding sensor: " + str(id))

Expand Down

0 comments on commit 26c3cf3

Please sign in to comment.