Ignore state of climate entities in prometheus (#29346)

This commit is contained in:
springstan 2019-12-03 21:54:25 +01:00 committed by Paulus Schoutsen
parent cae802f7ee
commit 4f8200d15a

View File

@ -284,15 +284,6 @@ class PrometheusMetrics:
) )
metric.labels(**self._labels(state)).set(current_temp) 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): def _handle_sensor(self, state):
unit = self._unit_string(state.attributes.get(ATTR_UNIT_OF_MEASUREMENT)) unit = self._unit_string(state.attributes.get(ATTR_UNIT_OF_MEASUREMENT))