This example code is supplied "as is" with no warranties of any kind, it works on my setup but it des not mean it will work on yours without modifications or at all. This example is meant to point you in the right direction. I take no responsibilities on it's usage. I've tried to document it sufficiently that it is readable and easy to understand.
When we installed our gas hob we were forced to put the bottle inside the kitchen, neither I or my wife liked the idea of having an LPG bottle in the kitchen without a gas sensor. So I whipped one up, it's not completed but it does the trick.
You will need to put the sensor at the bottom of the bottle as LPG is heavier that air.
- You are willing to get your hands dirty, this means a some code and some electronics assembly, but since you are using Home Assistant I guess you knew that already.
- You have a Home Assistant sever that is configured with your inverter of choice.
- You know how to map your Home Assistant server configuration folder via Samba.
- You have used ESPHome before.
Please note that links are given for reference only and are not affiliate!
- An ESP8266 or an ESP32
- ESP8366 South Africa - Eiferer - AliExpress - Amazon
- ESP32 South Africa - Eiferer - AliExpress - Amazon
- An MQ-6 LPG, Butane and Propane sensor
South Africa - DIY Electronics - AliExpress - ebay - Some wires
You will find the ESPHome code here
If it appear in ESPHome but not in Home Assistant, add it manually by using the IP you assigned to it.
The home assistant dashboard code is as follows
- type: gauge
name: LPG Concentration
needle: true
unit: "%"
entity: sensor.esphome_kitchen_gas_detector_lpg_gas_sensor
segments:
- from: 0
color: "#184B29"
- from: 30
color: "#996719"
- from: 40
color: "#800000"
I need to design a case and refine the code so the calculations are more accurate.
If you like my work and want to support the growth of the project, you can!