lubeda / EspHoMaTriXv2

A simple DIY status display with a 8x32 RGB LED matrix, implemented with esphome.io and Home Assistant.
MIT License
276 stars 25 forks source link

[FEATURE REQUEST] Ability to force text, rainbow_text screens #166

Closed idodov closed 9 months ago

idodov commented 9 months ago

Adding the capability to enforce not just icon screens would be highly appreciated.

riker09 commented 9 months ago

I don't fully understand what this feature request is about. Can you please explain in greater detail?

image

These two screens are not what you are referring to?

idodov commented 9 months ago

When using the Ulanzi_force_screen service to immediately display on the LED matrix, i need to include "icon_name," which is not available on the text_screen & rainbow_text_screen

andrewjswan commented 9 months ago

which is not available on the text_screen & rainbow_text_screen

In 2023.9.1 - Just specify any one. Like: rainbow :)

idodov commented 9 months ago

Where I need to specify the name?

I use the latest firmware. When I try to add a name to the screen I get Error running action: extra keys not allowed @ data['icon_name']. Got None.

service: esphome.ulanzi_rainbow_text_screen
enabled: true
data:
  default_font: true
  text: >-
    {{ state_attr('sensor.bidi', 'media_artist_bidi') }} - {{
    state_attr('sensor.bidi', 'media_title_bidi') }}
  lifetime: >-
    {{ (state_attr('media_player.era300', 'media_duration') | float(default=0) /
    1) | int(default=1) if state_attr('media_player.era300', 'media_duration')
    is not none else 4 }}
  screen_time: 40
  icon_name: rainbow

I also tried this method without luck. Sometimes, I have more than one screen in the loop.

service: esphome.ulanzi_force_screen
data:
  icon_name: rainbow
  mode: 8
lubeda commented 9 months ago

Hi, I never used it but a * for icon_name should work

andrewjswan commented 9 months ago

Where I need to specify the name?

Only in force like

service: esphome.ulanzi_force_screen
data:
  icon_name: rainbow
  mode: 8
idodov commented 9 months ago

I tried, but the screen appears a few seconds after I send the force screen command. The clock screen appears, not the text rainbow screen, which shows up after a few seconds.

This is a snip from my automation:

      - conditions:
          - condition: trigger
            id:
              - title
              - music
          - condition: state
            entity_id: media_player.era300
            state: playing
        sequence:
          - service: esphome.ulanzi_del_screen
            data:
              icon_name: "*"
              mode: 8
            enabled: true
          - service: esphome.ulanzi_del_screen
            data:
              icon_name: "*"
              mode: 5
          - service: esphome.ulanzi_rainbow_text_screen
            enabled: true
            data:
              default_font: true
              text: >-
                {{ state_attr('sensor.bidi', 'media_artist_bidi') }} - {{
                state_attr('sensor.bidi', 'media_title_bidi') }}
              lifetime: >-
                {{ (state_attr('media_player.era300', 'media_duration') |
                float(default=0) / 1) | int(default=1) if
                state_attr('media_player.era300', 'media_duration') is not none
                else 4 }}
              screen_time: 40
          - service: esphome.ulanzi_force_screen
            data:
              mode: 8
              icon_name: rainbow
andrewjswan commented 9 months ago

2023.9.1?

idodov commented 9 months ago

I used the main firmware until now. flashed 2023.9.1 and start to play with it!

Thanks!