Welcome to Incremental Social! Learn more about this project here!
Check out lemmyverse to find more communities to join from here!

Adding multiple buttons to ESPHome YAML

I'm trying to automate my dumb roomba. For this I ideally need a couple of buttons. I'm lost at how to add another button, that would have a different name and a different sent byte.

Additional question - to get info from the roomba (charging, battery, etc.) I need to send a similar byte series and then receive two unsigned bytes. I have no idea how to do that.

Roomba documentation: https://efcms.engr.utk.edu/ef230-2021-01/projects/roomba-s/create_2_Open_Interface_Spec.pdf

CameronDev , (edited )

I cant test this, but should it be something like:

# Example button configuration
button:
  - platform: template
    name: Livingroom Lazy Mood 1
    id: my_button

    # Optional variables:
    icon: "mdi:emoticon-outline"
    on_press:
      - logger.log: "Button 1 pressed"
  - platform: template
    name: Livingroom Lazy Mood 2
    id: my_button2

    # Optional variables:
    icon: "mdi:emoticon-outline"
    on_press:
      - logger.log: "Button 2 pressed"

As for the other thing, that might be something you need to write your own driver for? if you need some inspiration, this repo has a driver for mitsubishi heatpumps, which does something similar (read/write to a uart): https://github.com/echavet/MitsubishiCN105ESPHome

Shimon OP ,
@Shimon@slrpnk.net avatar

Thank you! This worked perfectly. And thanks for the link, will look into that

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • homeassistant@lemmy.world
  • incremental_games
  • meta
  • All magazines