Simple TelegramBot to control your home-assistant instance

Hi,

i created a simple TelegramBot with appdaemon to control my home-assistant instance. The project is available on github: https://github.com/foxcris/appdaemon-telegrambot
Feel free to give it a try.

The following commands are currently available:

  • /state_cover: State of cover
  • /state_vacuum: State of vacuum
  • /state_light: State of light
  • /state_climate: State of climate
  • /state_person: State of person
  • /open_cover: Open cover
  • /close_cover: Close cover
  • /turnoff_light: Turn off light
  • /turnon_light: Turn on light
  • /start_vacuum: Start vacuum
  • /stop_vacuum: Stop running vacuum
  • /restart_hass: Restart hass

Here some screenshots:


7 Likes

Thanks - I’ve been meaning to start working on something like that and having your examples makes it trivial for me to get going.

If you have any questions just send me a message.

I am still looking for some more ideas what functions could be offered via telegram. What is your plan? Perhaps i can borrow some ideas?

Hi; thanks for sharing this. Question, where would you modify the .py files to get more than 8 box selections in telegram’s inline keyboard? Specifically for my lights and switches, I have way more than 8 and can’t seem to get a command for on/off sent past the first 8 that get the boxes in the inline keyboard. Thanks again

On my screenshot above you can see that i had the same issue. Only 8 buttons are shown for 9 covers. Didn’t noticed that till now. I have fixed the issue and have just updated the repositoy on github. Just checkout the updated version. I am now adding multiple rows for the inline keyboard. After 8 buttons a new row is started.

1 Like

hi @foxcris, very interesting telegram BOT!! I’m thinking of adding inline buttons, do you know if there are some examples with buttons? I don’t find much examples on github or in this forum!

Check out this thread. I think it’s exactly what you are looking for.

hi @Jumping, i am currently using the “Inline keyboard” and in my github repository you can find the used code. Are “inline buttons” something different? I always use the python-telegram-bot library to take a look at the api and i cannot find any “inline buttons” there.

thanks @foxcris and @Burningstone for your answers!
@foxcris you are right: “buttons” is not the correct word :slight_smile: I will see you code with inline keyboard, thanks

Which version of appdaemon did you use? I am using appdaemon 4 and getting errors.