mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Merge pull request #967 from HydrelioxGitHub/NetAtmo-icons
Add icons to NetAtmo sensors
This commit is contained in:
commit
0042e7725d
@ -23,11 +23,11 @@ REQUIREMENTS = [
|
|||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
SENSOR_TYPES = {
|
SENSOR_TYPES = {
|
||||||
'temperature': ['Temperature', TEMP_CELCIUS],
|
'temperature': ['Temperature', TEMP_CELCIUS, 'mdi:thermometer'],
|
||||||
'co2': ['CO2', 'ppm'],
|
'co2': ['CO2', 'ppm', 'mdi:cloud'],
|
||||||
'pressure': ['Pressure', 'mbar'],
|
'pressure': ['Pressure', 'mbar', 'mdi:gauge'],
|
||||||
'noise': ['Noise', 'dB'],
|
'noise': ['Noise', 'dB', 'mdi:volume-high'],
|
||||||
'humidity': ['Humidity', '%']
|
'humidity': ['Humidity', '%', 'mdi:water-percent']
|
||||||
}
|
}
|
||||||
|
|
||||||
CONF_SECRET_KEY = 'secret_key'
|
CONF_SECRET_KEY = 'secret_key'
|
||||||
@ -104,6 +104,10 @@ class NetAtmoSensor(Entity):
|
|||||||
def name(self):
|
def name(self):
|
||||||
return self._name
|
return self._name
|
||||||
|
|
||||||
|
@property
|
||||||
|
def icon(self):
|
||||||
|
return SENSOR_TYPES[self.type][2]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
""" Returns the state of the device. """
|
""" Returns the state of the device. """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user