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

New sensors #9

Open
Lukylic opened this issue Feb 18, 2023 · 3 comments
Open

New sensors #9

Lukylic opened this issue Feb 18, 2023 · 3 comments

Comments

@Lukylic
Copy link

Lukylic commented Feb 18, 2023

Hello,
I would like to had the others sensors but I faild to do so... :-(
I started first with ampHourRemaining I did update senso.py/ junctek_kgf.cpp/ junctek_kgf.h but there is mistake someware.... I cannot found were..... May you help me?
components.zip
'CONF_AMPHOUR_REMAINING' is not defined

@tfyoung
Copy link
Owner

tfyoung commented Feb 28, 2023

Can you make it as a pull request or share a git repo that has the diff so I can easily see what you've added?

Just by looking at the error though, I think you need to define CONF_AMPHOUR_REMAINING in sensors.py.

e.g. add CONF_AMPHOUR_REMAINING = "amphours_remaining". This is needed for config types which can't be pulled from esphome. The esphome const.py showing the included ones is at https://github.com/esphome/esphome/blob/dev/esphome/const.py If there is something sensible to describe the variable in that list, then you import it, if nothing makes sense then you need to declare it locally yourself.

E.g. In my other module for an air conditioner, I defined
https://github.com/tfyoung/esphome-MHIHeatPump/blob/main/components/MHIHeatPump/sensor.py CONF_OUTDOOR_TEMPERATURE = "outdoor_temperature"

@Lukylic
Copy link
Author

Lukylic commented Mar 4, 2023

Hello, thanks for your answer. I do not know what you mean by "a pull request or share a git repo". so I highlight on yellow w
![juncteck_kgf_h](https://us
juncteck_kgf_cpp
er-images.githubusercontent.com/76538705/222923987-d4253300-c8bb-47d5-aaa9-5411e4fe1fba.jpg)
hat i did modify on you original Files. and i post it on this message.
Sensor py

@Lukylic
Copy link
Author

Lukylic commented Mar 4, 2023

juncteck_kgf_h

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

2 participants