JayBlackedOut / hass-nhlapi

NHL Stats API Integration Into Home Assistant
64 stars 18 forks source link

Scan Interval Config Error #25

Closed abhwang closed 3 years ago

abhwang commented 3 years ago

I am running Home Assistant on a Raspberry PI and want to define the scan interval to be greater than 1 second per the documentation.

My config.yaml has scan_interval: 30 and I get the following error message when checking the config for errors: Invalid config for [sensor.nhl_api]: expected int for dictionary value @ data['scan_interval']. Got datetime.timedelta(seconds=30). (See ?, line ?).

JayBlackedOut commented 3 years ago

Hi, are you running version 0.7.1? Can you also paste your full log?

JayBlackedOut commented 3 years ago

I was able to replicate this. I'm looking into it asap.

JayBlackedOut commented 3 years ago

Looks like an issue with the configuration validator. Despite this error message, the sensor loads properly. I will look at it more closely this evening.

JayBlackedOut commented 3 years ago

My mistake, I had the configuration validator check for an integer instead of a timedelta. Will be fixed in 0.7.2.