Log bayesian sensor name for unavailable observations (#152039)

This commit is contained in:
HarvsG
2025-09-11 22:14:51 +01:00
committed by GitHub
parent 4985f9a5a1
commit b12c458188

View File

@@ -497,16 +497,18 @@ class BayesianBinarySensor(BinarySensorEntity):
_LOGGER.debug( _LOGGER.debug(
( (
"Observation for entity '%s' returned None, it will not be used" "Observation for entity '%s' returned None, it will not be used"
" for Bayesian updating" " for updating Bayesian sensor '%s'"
), ),
observation.entity_id, observation.entity_id,
self.entity_id,
) )
continue continue
_LOGGER.debug( _LOGGER.debug(
( (
"Observation for template entity returned None rather than a valid" "Observation for template entity returned None rather than a valid"
" boolean, it will not be used for Bayesian updating" " boolean, it will not be used for updating Bayesian sensor '%s'"
), ),
self.entity_id,
) )
# the prior has been updated and is now the posterior # the prior has been updated and is now the posterior
return prior return prior