mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Ignore state of climate entities in prometheus (#29346)
This commit is contained in:
parent
cae802f7ee
commit
4f8200d15a
@ -284,15 +284,6 @@ class PrometheusMetrics:
|
||||
)
|
||||
metric.labels(**self._labels(state)).set(current_temp)
|
||||
|
||||
metric = self._metric(
|
||||
"climate_state", self.prometheus_cli.Gauge, "State of the thermostat (0/1)"
|
||||
)
|
||||
try:
|
||||
value = self.state_as_number(state)
|
||||
metric.labels(**self._labels(state)).set(value)
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
def _handle_sensor(self, state):
|
||||
unit = self._unit_string(state.attributes.get(ATTR_UNIT_OF_MEASUREMENT))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user