mikosoft83 / pithy_screen_menu_system

GNU General Public License v3.0
58 stars 9 forks source link

Continuous menu doesen't work #2

Closed albasee closed 3 years ago

albasee commented 3 years ago

Hi

I really love this project! I'm looking for something like this since a long time!

Before I get one of those devices, I try to do it with my own stuff.

I now started with just a small menu structure. I just want to change the brightness of a light.

For now, most of the setup works and I have now an Idea how it will look like in the future.

unfortunatelly I could never change the brightness so far. All it is doing is switch off the light and in the display its writing "nan" for the brightness value.

When I check the log output of esphome, the value submitted from the rotary encoder is always "-1"! which is very strange!

But I know that the rotary is working, because I made some other tests wit it. I Think there is a bug somewhere in the code.

May I send you the generated code to check that?

Thanks a lot!

mikosoft83 commented 3 years ago

Hi

Yes, the brightness (and also light temperature) are an issue. I will fix it in next version but I didn't get around it.

The problem is with the template entities in HA, for some reason, brightness and temperature are not correctly reported when they are 0. So as a temporary fix please manually set up your entities like this: value_template: "{{ state_attr('entity.name', 'brightness') | int | round(0) }}"

I will add this to the generator when I finally get time to do so.