core: Google Travel Time integration causes a filter to emit a warning due to an "unknown" state during start-up

The problem

If a sensor has an unknown value, typically during start-up, the filter integration will bomb out. I don’t see what I can do about this, unless I need to report this as a Google Travel Time bug (which would also be a core bug then).

2023-02-05 21:39:57.250 WARNING (MainThread) [homeassistant.components.sensor] Sensor sensor.google_travel_time_filtered has device class None, state class None and unit min thus indicating it has a numeric value; however, it has the non-numeric value: unknown (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+filter%22

What version of Home Assistant Core has the issue?

core-2023.2.3

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

filter

Link to integration documentation on our website

https://www.home-assistant.io/integrations/filter/ https://www.home-assistant.io/integrations/google_travel_time/

Diagnostics information

No response

Example YAML snippet

- platform: filter
  name: google_travel_time_filtered
  entity_id: sensor.google_travel_time
  filters:
    filter: lowpass
    time_constant: 10
    precision: 0

Anything in the logs that might be useful for us?

2023-02-05 21:39:57.250 WARNING (MainThread) [homeassistant.components.sensor] Sensor sensor.google_travel_time_filtered has device class None, state class None and unit min thus indicating it has a numeric value; however, it has the non-numeric value: unknown (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+filter%22

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 3
  • Comments: 17 (7 by maintainers)

Most upvoted comments

Sure, but Google Travel Time — from my bug report — is a built-in (core bundled) integration causing this issue and this issue is logged on core. I stated my uncertainty in the original report. Are you dismissing the issue then?

I’m just dismissing that the bug is on filter, google_travel_time code owner should address this by making the entity unavailable when it cannot retrieve a numerical value.