Clean up access to config in various integrations v2 (#33763)
This commit is contained in:
parent
d95ffb3aa3
commit
d7e3b0b755
20 changed files with 59 additions and 59 deletions
|
@ -97,10 +97,10 @@ def update_probability(prior, prob_given_true, prob_given_false):
|
|||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
"""Set up the Bayesian Binary sensor."""
|
||||
name = config.get(CONF_NAME)
|
||||
observations = config.get(CONF_OBSERVATIONS)
|
||||
prior = config.get(CONF_PRIOR)
|
||||
probability_threshold = config.get(CONF_PROBABILITY_THRESHOLD)
|
||||
name = config[CONF_NAME]
|
||||
observations = config[CONF_OBSERVATIONS]
|
||||
prior = config[CONF_PRIOR]
|
||||
probability_threshold = config[CONF_PROBABILITY_THRESHOLD]
|
||||
device_class = config.get(CONF_DEVICE_CLASS)
|
||||
|
||||
async_add_entities(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue