Hello everyone,
I am currently building a smart planter with soil moisture and light sensor as well as a water pump for watering the plants. The actual hardware and software is already mostly done but I am struggling with the homeassistant MQTT integration and the auto discovery message. This post however is mostly about actually choosing the right platform for the MQTT integration.
My main issue is that I am unsure on what device type would best describe the pump component of my project. My current MQTT interface for the pump is a topic to which you can push a time duration in milliseconds for which the pump will run. I thought about using the Valve platform from the MQTT integration since that matches the intent of what I am doing the most, but I don’t think that my current interface is compatible with it.
Alternatively I could redesign the interface and make the pump duration a configurable option using the Number platform with a separate Button* component in homeassistant for actually triggering the pump.
What are your thoughts? I’d be thankful for any recommendations.
PS: This is my current MQTT topic interface:
ESPlanter/<device-id>/lux => light sensor reading
ESPlanter/<device-id>/moisture => moisture sensor reading
ESPlanter/<device-id>/trigger_pump_ms => command topic for triggering the pump
*I wanted to put a link here as well but as a “new” user I have a limit of 2 links per post…