Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A noob question: how to run/use a "keypad" component? #11

Closed
Protoncek opened this issue Apr 7, 2021 · 13 comments
Closed

A noob question: how to run/use a "keypad" component? #11

Protoncek opened this issue Apr 7, 2021 · 13 comments

Comments

@Protoncek
Copy link

Hello!
I'm struggling, but with no success. Can someone please point me into correct procedure? I just don't know how to run "keypad" (or any other, to be honest) component. I copied keypad folder into config/custom_components, i included keypad_text_sensor.h into my ESPHome code, but i keep getting error : component "keypad" not found.
What am i doing wrong? HA and ESPHome are wonderfull apps, it's just that beginner's help is way too hard to find...

@Protoncek Protoncek changed the title A noob question: how to run a component? A noob question: how to run/use a "keypad" component? Apr 7, 2021
@ssieb
Copy link
Owner

ssieb commented Apr 7, 2021

You don't use the includes: for this. It works just like the built-in components. I think you've put the folder in the wrong place though. You should have /config/esphome/custom_components/keypad/__init__.py for example.

Repository owner deleted a comment from DelroyTaylor Apr 7, 2021
@Protoncek
Copy link
Author

Great, many thanks! Keypad now works! Now i have to send finished code into HA- how should i create text sensor to send finished code into HA?
And: when i stop typing code and i DON'T press # - is is any reset time or program holds partly entered code indefinitely?

(sorry for "dumb" questions, i'm pretty noob in these things... i'm still heavily learning...)

@ssieb
Copy link
Owner

ssieb commented Apr 7, 2021

The keypad text_sensor already does the sending to HA. It depends on what you want to do with the result. There's also the on_value trigger of the text_sensor if you want to have other actions.
There is no reset timeout. You could file an issue if you want that.

@danyboy666
Copy link

Is there a way to use this with the PCF8574 componant? I guess I need a I2C keypad library or componant?

@ssieb
Copy link
Owner

ssieb commented Apr 7, 2021

https://esphome.io/components/pcf8574.html
You can use the pin: definition there with the keypad.

@ssieb
Copy link
Owner

ssieb commented Apr 7, 2021

I recommend coming to the esphome Discord server for more interactive help.

@danyboy666
Copy link

I'll come check it out thank you.

@Protoncek
Copy link
Author

The keypad text_sensor already does the sending to HA. It depends on what you want to do with the result.

That's what i thought, too, but i get nothing in HA, nor i find any "keypad" sensor... i did a copy/paste of your example in my yaml.

There is no reset timeout. You could file an issue if you want that.

It would be a very good idea to implement a reset after, say, 5-10 seconds. Currently it can happen a situation when someone (passing by) accidentally (or intentionally) hits a number or two and when i come to enter a number it won't be correct one unless i hit asterix first an only then enter a number.

@irqnet
Copy link

irqnet commented Oct 11, 2021

The keypad text_sensor already does the sending to HA. It depends on what you want to do with the result.

That's what i thought, too, but i get nothing in HA, nor i find any "keypad" sensor... i did a copy/paste of your example in my yaml.

There is no reset timeout. You could file an issue if you want that.

It would be a very good idea to implement a reset after, say, 5-10 seconds. Currently it can happen a situation when someone (passing by) accidentally (or intentionally) hits a number or two and when i come to enter a number it won't be correct one unless i hit asterix first an only then enter a number.

Same here, it seems that no sensor is exposed to Homeassistant so I cannot process the entered code there. Has anyone solved that?

@belgianrubs
Copy link

belgianrubs commented Oct 12, 2021

The keypad text_sensor already does the sending to HA. It depends on what you want to do with the result.

That's what i thought, too, but i get nothing in HA, nor i find any "keypad" sensor... i did a copy/paste of your example in my yaml.

There is no reset timeout. You could file an issue if you want that.

It would be a very good idea to implement a reset after, say, 5-10 seconds. Currently it can happen a situation when someone (passing by) accidentally (or intentionally) hits a number or two and when i come to enter a number it won't be correct one unless i hit asterix first an only then enter a number.

Same here, it seems that no sensor is exposed to Homeassistant so I cannot process the entered code there. Has anyone solved that?

I had the same. It's due to the fact that he didn't use the 'name:' field. If you add the name field, it should probably work.
I wrote a little bit more documentation about it, as I couldn't find anything about this interesting topic.

@ssieb
Copy link
Owner

ssieb commented Oct 12, 2021

I didn't think it's generally useful to publish the value directly to HA. It's something you would normally process locally on the ESP. But yes, it's a standard text_sensor, so if you want to publish it, just give it a name:.

@ssieb
Copy link
Owner

ssieb commented Nov 20, 2022

@belgianrubs just letting you know that there have been very large changes in how to use this component, so your documentation is out of date. Did you write it before external_components: was available? Also, I'm in the process of integrating the components to main esphome.

@ssieb ssieb closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2022
@belgianrubs
Copy link

@ssieb Sorry for the late response, totally missed your question. I'm not sure about that, I downloaded the files back in the day and copied them into the custom_components folder.
Great to hear that the component is moving to main ESPHome, I'm looking forward to see it pop-up there! Thanks for all the effort you're putting into ESPHome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants