mirror of
https://github.com/home-assistant/core.git
synced 2026-12-04 20:59:22 -04:00
Group sequential add_entities calls in Neurio energy (#187522)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
7a7dfa4b72
commit
672991e05b
@@ -75,22 +75,18 @@ def setup_platform(
|
||||
update_daily()
|
||||
update_active()
|
||||
|
||||
# Active power sensor
|
||||
add_entities([NeurioEnergy(data, ACTIVE_NAME, ACTIVE_TYPE, update_active)])
|
||||
# Daily power sensor
|
||||
add_entities([NeurioEnergy(data, DAILY_NAME, DAILY_TYPE, update_daily)])
|
||||
# Active generation sensor
|
||||
add_entities(
|
||||
[
|
||||
NeurioEnergy(data, ACTIVE_NAME, ACTIVE_TYPE, update_active),
|
||||
NeurioEnergy(data, DAILY_NAME, DAILY_TYPE, update_daily),
|
||||
NeurioEnergy(
|
||||
data, ACTIVE_GENERATION_NAME, ACTIVE_GENERATION_TYPE, update_active
|
||||
)
|
||||
),
|
||||
NeurioEnergy(
|
||||
data, DAILY_GENERATION_NAME, DAILY_GENERATION_TYPE, update_daily
|
||||
),
|
||||
]
|
||||
)
|
||||
# Daily generation sensor
|
||||
add_entities(
|
||||
[NeurioEnergy(data, DAILY_GENERATION_NAME, DAILY_GENERATION_TYPE, update_daily)]
|
||||
)
|
||||
|
||||
|
||||
class NeurioData:
|
||||
|
||||
Reference in New Issue
Block a user