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

max7219 set_intensity not working #4942

Closed
petr-nov opened this issue Oct 2, 2023 · 2 comments · Fixed by esphome/esphome#5477
Closed

max7219 set_intensity not working #4942

petr-nov opened this issue Oct 2, 2023 · 2 comments · Fixed by esphome/esphome#5477

Comments

@petr-nov
Copy link

petr-nov commented Oct 2, 2023

The problem

max7219 set_intensity not working after last update.

Which version of ESPHome has the issue?

2023.9.2

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2023.9.3

What platform are you using?

ESP8266

Board

d1_mini

Component causing the issue

No response

Example YAML snippet

display:
  - platform: max7219
    cs_pin: D4
    num_chips: 1
    intensity: 2
    lambda: |-
        it.set_intensity(id(brightness).state);
        if (id(displaypage) == 1) {
            it.strftime("%H.%M",id(esptime).now());
            it.printf(4, "%5.1f", id(obyvak_temperature).state);
            }
        else if (id(displaypage) == 2) {
            it.strftime("%H.%M",id(esptime).now());
            it.printf(4, "%5.1f", id(venku_temperature).state);
            }
        else if (id(displaypage) == 3) {
            it.print("spo.");
            it.printf(4, "%4.0f", id(load).state);
            }
        else if (id(displaypage) == 4) {
            it.print("bat.");
            it.printf(4, "%3.0fP", id(pv_soc).state);
            }
        else if (id(displaypage) == 5) {
            it.print("fve.");
            it.printf(4, "%4.0f", id(pv_pac).state);
            }
        else if (id(displaypage) == 6) {
            it.print("den.");
            it.printf(4, "%5.1f", id(pv_eday).state);
            }            
        else if (id(displaypage) == 7 and id(boiler_pumpcoworks).state) {
            it.print("tOP.");
            it.printf(4, "%5.1f", id(mixer_temp).state);
            }
        else {
            it.print("bOJ.");
            it.printf(4, "%5.1f", id(huw_temp).state);
            }

Anything in the logs that might be useful for us?

No response

Additional information

No response

@kb2ear
Copy link

kb2ear commented Oct 2, 2023

Same here with

it.set_intensity(0);

always at max brightness.

@clydebarrow
Copy link

I raised a PR to fix this. Add this to your yaml:

external_components:
    source: github://pr#5477
    components: [ max7219 ]
    refresh: always

@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants