Originally intended to be used with its companion app, once flashed using `tuya-convert <https://github.com/ct-Open-Source/tuya-convert>`__, ESPHome generated
firmware can be uploaded allowing you to control the Wifi Smart Fish Feeder via Home Assistant.
# Switch to turn feeder on for 3 seconds/off and turn on/off LED
- platform: gpio
name: 'Relay feeder'
id: relay
pin: GPIO14
on_turn_on:
- light.turn_on: led
- delay: 3s
- switch.turn_off: relay
- light.turn_off: led
restore_mode: ALWAYS_OFF
sensor:
# Feeder counter
- platform: pulse_meter
pin: GPIO12
name: 'Counter/min'
unit_of_measurement: 'time(s)'
internal: true
total:
unit_of_measurement: 'time(s)'
name: 'Counter feeder'
# To allow led to be controlled via GPIO
output:
- platform: esp8266_pwm
id: blue_led
pin:
number: GPIO5
inverted: true
# LED control
light:
- platform: monochromatic
output: blue_led
id: led
You can now add your Wifi Smart Fish Feeder to Home Assistant via the configurations page, look for 'ESPHome' under the Integrations option and click 'Configure'.
See Also
--------
-:doc:`/components/binary_sensor/gpio`
-:doc:`/components/switch/gpio`
-:doc:`/components/sensor/pulse_meter`
-:doc:`/components/output/esp8266_pwm`
-:doc:`/components/light/monochromatic`
-:doc:`/guides/automations`
-`Fish Feeder diagrams and pictures <https://community.openhab.org/t/ilonda-fish-feeder-openhab/99190>`__.