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

service set_clock_color don't change clock color #11

Closed
jblb opened this issue May 13, 2023 · 1 comment
Closed

service set_clock_color don't change clock color #11

jblb opened this issue May 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jblb
Copy link

jblb commented May 13, 2023

Bug report

Describe the bug

when calling service set_clock_color from ha clock color don't change on display

Additional information

  • used Hardware:
    • ESP8266
    • EspHoMaTriXv2 version: [last main branch]

To Reproduce

fire a esphomatrix_set_clock_color with 3 values from homeassistant developer tools service

Expected behavior

a change for clock color, but only got a log entry says "[D][EHMTXv2:086]: default clock color r: 255 g: 127 b: 0
" but no color change

Configuration

substitutions:
  devicename: esphomatrix

esphome:
  name: $devicename
  friendly_name: EspHoMaTriX

esp8266:
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "********************************************"

ota:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphomatrix Fallback Hotspot"

captive_portal:

external_components:
  - source:
      type: git
      url: https://github.com/lubeda/EspHoMaTriXv2
      ref: main 

time:
  - platform: homeassistant
    id: ehmtx_time

binary_sensor:
  - platform: status
    name: "$devicename Status"

button:
  - platform: restart
    name : "restart $devicename"

light:
  - platform: neopixelbus
    pin: GPIO2
    num_leds: 256
    type: GRB
    variant: WS2812
    name: "led_matrix"
    id: matrix_component
    method:
      type: esp8266_uart
      bus: 1
      async: false
    default_transition_length: 0s

font:
  - file: EHMTXv2.ttf
    id: default_font
    size: 16
    glyphs:  |
      !?"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnÖÄÜöäüopqrstuvwxyz@<>ߧ€/

display:
  - platform: addressable_light
    id: ehmtx_display
    addressable_light_id: matrix_component
    width: 32
    height: 8
    pixel_mapper: |-
      if (x % 2 == 0) {
        return (x * 8) + y;
      }
      return (x * 8) + (7 - y);
    rotation: 0
    update_interval: 16ms
    auto_clear_enabled: true
    lambda: |-
      id(rgb8x32)->tick();
      id(rgb8x32)->draw();

ehmtxv2:
  id: rgb8x32
  show_seconds: false
  matrix_component: ehmtx_display
  time_component: ehmtx_time
  icons2html: true
  default_font_id: default_font
  default_font_yoffset: 6
  special_font_id: default_font
  special_font_yoffset: 7
  brightness: 80 # percent
  time_format: "%H:%M"
  date_format: "%d.%m."
  week_start_monday: true # false equals sunday
  scroll_count: 2 # scroll long text at least two times
  scroll_interval: 80 # milliseconds
  rainbow_interval: 32 # milliseconds
  frame_interval: 192 # milliseconds
  icons:
    - id: error
      lameid: 40530
    - id: home_assistant
      lameid: 47693
    - id: temperature
      lameid: 2056
    - id: lightbulb
      lameid: 1762
    - id: music
      lameid: 45625
    - id: phone
      lameid: 1232
    - id: car
      lameid: 2819
    - id: sleep8x32
      url: https://user-images.githubusercontent.com/16407309/224850723-634c9b2d-55d9-44f2-9f93-765c0485b090.gif
  on_next_screen:
    - homeassistant.event:
        event: esphome.new_screen
        data_template:
          iconname: !lambda "return icon.c_str();"
          text: !lambda "return text.c_str();"

number:
  - platform: template
    name: "$devicename LED brightness"
    min_value: 0
    max_value: 255
    step: 1
    lambda: |-
      return id(rgb8x32)->get_brightness();
    set_action:
      lambda: |-
        id(rgb8x32)->set_brightness(x);

switch:
  - platform: template
    name: "$devicename Display"
    icon: "mdi:power"
    lambda: |-
      return id(rgb8x32)->show_display;
    turn_on_action:
      lambda: |-
        id(rgb8x32)->set_display_on();
    turn_off_action:
      lambda: |-
        id(rgb8x32)->set_display_off();

Logs

[15:41:38][D][EHMTXv2:032]: queue: clock for 10 sec
[15:41:49][D][EHMTXv2:035]: queue: date for 5 sec
[15:41:54][D][EHMTXv2:086]: default clock color r: 255 g: 127 b: 0
[15:41:55][D][EHMTXv2:032]: queue: clock for 10 sec

Services calls

service: esphome.esphomatrix_set_clock_color
data:
  r: 255
  g: 127
  b: 0
@jblb jblb added the bug Something isn't working label May 13, 2023
@lubeda
Copy link
Owner

lubeda commented May 13, 2023

Fixed

@lubeda lubeda closed this as completed May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants