#Yaml created sensor vs UI created sensor (same sensor, different value)

1 messages · Page 1 of 1 (latest)

celest linden
#

Hi. I've been using this yaml sensor for ages:

# Average humidity in Bathroom DS, for use with automation triggering 
# bathroom fan toggle
- platform: statistics
  name: Bathroom One Humidity Average Linear 24h
  entity_id: sensor.0x00124b00251c65c2_humidity
  state_characteristic: average_linear
  sampling_size: 20
  max_age:
    hours: 24```

Now, today I started doing some cleaning in helpers, automations and all that. The above sensor is visible in the HELPERS section of the UI, but since it's yaml created it cannot be edit (due to the lack of unique id). I decided to make the same sensor via UI. Used all the same data for it, the same entity, state characteristics, sampling size, max age. The problem is the yaml one and the UI one show different values. At the moment the yaml one is 79.4% the UI one is 80.15%. How come? Am I missing something here?
#

Yaml created sensor vs UI created sensor (same sensor, different value)

#

This is the UI sensor.

jolly tangle
#

maybe cause they updated at different times?

#

if you just made it wait a bit and see if it settles

daring hemlock
#

Are you on the latest version? When I do it via the UI I have a "Keep last sample" toggle as well. Maybe that was enabled by default previous?