Skip to content

Commit b12c458

Browse files
authored
Log bayesian sensor name for unavailable observations (home-assistant#152039)
1 parent 4985f9a commit b12c458

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

homeassistant/components/bayesian/binary_sensor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,16 +497,18 @@ def _calculate_new_probability(self) -> float:
497497
_LOGGER.debug(
498498
(
499499
"Observation for entity '%s' returned None, it will not be used"
500-
" for Bayesian updating"
500+
" for updating Bayesian sensor '%s'"
501501
),
502502
observation.entity_id,
503+
self.entity_id,
503504
)
504505
continue
505506
_LOGGER.debug(
506507
(
507508
"Observation for template entity returned None rather than a valid"
508-
" boolean, it will not be used for Bayesian updating"
509+
" boolean, it will not be used for updating Bayesian sensor '%s'"
509510
),
511+
self.entity_id,
510512
)
511513
# the prior has been updated and is now the posterior
512514
return prior

0 commit comments

Comments
 (0)