@@ -67,13 +67,13 @@ async def async_setup_platform(
6767 async_add_entities (
6868 new_entities = [
6969 PrometheusSensor (
70- prometheus ,
71- query [CONF_EXPR ],
72- query .get (CONF_UNIQUE_ID ),
73- query [CONF_NAME ],
74- query .get (CONF_DEVICE_CLASS ),
75- query .get (CONF_STATE_CLASS ),
76- query .get (CONF_UNIT_OF_MEASUREMENT ),
70+ prometheus = prometheus ,
71+ expression = query [CONF_EXPR ],
72+ unique_id = query .get (CONF_UNIQUE_ID ),
73+ device_name = query [CONF_NAME ],
74+ device_class = query .get (CONF_DEVICE_CLASS ),
75+ state_class = query .get (CONF_STATE_CLASS ),
76+ unit_of_measurement = query .get (CONF_UNIT_OF_MEASUREMENT ),
7777 )
7878 for query in config [CONF_QUERIES ]
7979 ],
@@ -86,14 +86,15 @@ class PrometheusSensor(SensorEntity):
8686
8787 def __init__ (
8888 self ,
89+ * ,
8990 prometheus : Prometheus ,
9091 expression : str ,
9192 unique_id : str | None ,
9293 device_name : str ,
9394 device_class : SensorDeviceClass | None ,
9495 state_class : SensorStateClass | None ,
9596 unit_of_measurement : str | None ,
96- ):
97+ ) -> None :
9798 """Initialize the sensor."""
9899 self ._prometheus : Prometheus = prometheus
99100 self ._expression = expression
0 commit comments