Home-Assistant sensor for Xiaomi LYWSD02 Hygrometer Thermometer.
TODO: Add more documentation
- Copy
custom_components/lywsd02
directory intocustom_components
inside your HA directory (typically, whereconfiguration.yaml
is placed). - Add this block into
configuration.yaml
wherelywsd02: mac: 3A:57:C8:89:70:BE sensor: - enabled: true name: 'My Thermometer'
mac
property is you'r BT Thermometer mac address. See mitemp_bt docs for instructions. - Update or create sensor templates (this step will be simplified in future)
sensor: - platform: template sensors: my_temp: friendly_name: "Entrance Temperature" value_template: "{{ states.sensor.my_thermometer.attributes.temperature }}" unit_of_measurement: 'ºC' my_humid: friendly_name: "Entrance Humidity" value_template: "{{ states.sensor.my_thermometer.attributes.humidity }}" unit_of_measurement: '%'
- Restart Home-Assistant
Name | Type | Units | Description |
---|---|---|---|
tetemperature | float | °C | Temperature measured value |
humidity | int | % | Relative Humidity measured value |
battery_level | int | % | Experimental Device battery level. I'm not sure that it gets correct |
time | str | time string | Current time displayed on device |