Giter VIP home page Giter VIP logo

Comments (10)

lubeda avatar lubeda commented on July 29, 2024 1

Hi,
I think this is no bug. This is more like a hidden automatism. Try changing your YAML like this:

on_empty_queue:
    then:
      - lambda: |-
          id(rgb8x32).set_infotext_color(20,20,20,20,20,20,false,1);
          id(rgb8x32).icon_clock("calendar|day#0",1440,10,false,255,140,0);

So the clock color isn't overwritten by the default color.

from esphomatrixv2.

pepe59 avatar pepe59 commented on July 29, 2024 1

Thank you very much. I wandered a bit in the documentation. Using sample codes, I now understood how to configure.
Everything works perfectly.
I will close the issue.

from esphomatrixv2.

pepe59 avatar pepe59 commented on July 29, 2024

Yes, the clock color is not overridden by the default color.
Date only.
I am using the code from the ulanzi-easy.yaml documentation for the Ulanzi TC001 device.
If I add your recommended yaml to the end of ulanzi-easy.yaml

  on_next_screen:
    - homeassistant.event:
        event: esphome.new_screen
        data_template:
          iconname: !lambda "return icon.c_str();"
          text: !lambda "return text.c_str();"

  on_empty_queue:
    then:
      - lambda: |-
          id(rgb8x32).set_infotext_color(20,20,20,20,20,20,false,1);
          id(rgb8x32).icon_clock("calendar|day#0",1440,10,false,255,140,0);

an error occurs in the code
[on_empty_queue] is an invalid option for [ehmtxv2]. Did you mean [allow_empty_screen]?

from esphomatrixv2.

andrewjswan avatar andrewjswan commented on July 29, 2024

an error occurs in the code

EspHoMaTriXv2 version?

from esphomatrixv2.

pepe59 avatar pepe59 commented on July 29, 2024

Installed as per documentation

external_components:
  - source:
      type: git
      url: https://github.com/lubeda/EspHoMaTriXv2
      ref: main
    refresh: 60s 
    components: [ ehmtxv2 ]   

esphome:
  comment: "EHMTXv2 from LuBeDa"
  name: $devicename 
  project:
    name: "Ulanzi.EHMTXv2"
    version: "2.0.0"
  on_boot:
    then:
      - ds1307.read_time:

from esphomatrixv2.

andrewjswan avatar andrewjswan commented on July 29, 2024

on_empty_queue added in 2023.8.0 - https://github.com/lubeda/EspHoMaTriXv2/tree/2023.8.0?tab=readme-ov-file#esphomatrix-202380
Try Pre Release version - https://github.com/lubeda/EspHoMaTriXv2/tree/2024.1.0-prerelease

from esphomatrixv2.

pepe59 avatar pepe59 commented on July 29, 2024

I installed the pre version

external_components:
  - source:
      type: git
      url: https://github.com/lubeda/EspHoMaTriXv2
      ref: "2024.1.0"
    refresh: 600s 
    components: [ ehmtxv2 ]

The first thing that appears is the calendar icon (I don't know how to remove it or change it to another one. I don't like it very much). Hours and days of the week are displayed. The hours do not alternate with the date. It's still just a static clock.
That's why I can't tell if the color of the date will change after 24 hours.

  on_empty_queue:
      then:
        - lambda: |-
            id(rgb8x32).set_infotext_color(20,20,20,20,20,20,false,1);
            id(rgb8x32).icon_clock("calendar|day#0",1440,10,false,255,140,0);

log

[20:59:35][I][EHMTXv2:2146]: set_brightness 41 => 16.08 %
[20:59:36][D][EHMTXv2:938]: oldest queue element is: 0/1
[20:59:36][D][EHMTXv2:128]: queue: icon clock: "day#0" for: 10.0 sec
[20:59:37][D][sht3xd:064]: Got temperature=33.44°C humidity=23.81%
[20:59:37][D][sensor:094]: 'ulanzi Teplota': Sending state 33.43557 °C with 1 decimals of accuracy
[20:59:37][D][sensor:094]: 'ulanzi Vlhkost': Sending state 23.80560 % with 1 decimals of accuracy
[20:59:45][D][sensor:094]: 'ulanzi Luxmetr': Sending state 124.64687 lx with 0 decimals of accuracy
[20:59:46][D][EHMTXv2:938]: oldest queue element is: 0/1
[20:59:46][D][EHMTXv2:128]: queue: icon clock: "day#0" for: 10.0 sec
[20:59:55][D][sensor:094]: 'ulanzi Luxmetr': Sending state 124.83978 lx with 0 decimals of accuracy
[20:59:56][D][EHMTXv2:938]: oldest queue element is: 0/1
[20:59:56][D][EHMTXv2:128]: queue: icon clock: "day#0" for: 10.0 sec

from esphomatrixv2.

pepe59 avatar pepe59 commented on July 29, 2024

Can I find sample code somewhere for the Ulanzi screen where it's just the clock alternating with the date and days of the week like it was in previous versions ?

from esphomatrixv2.

andrewjswan avatar andrewjswan commented on July 29, 2024

What was in the previous version? Everything that was available in the old version is available here.

from esphomatrixv2.

andrewjswan avatar andrewjswan commented on July 29, 2024

I don't know how to remove it or change it to another one. I don't like it very much

Only clock with icon:

  on_start_running:
     then:
       lambda: |-
          id(rgb8x32)->icon_clock("another_one_icon", 1440, 10, false, 255, 140, 0);

  on_empty_queue:
    then:
      lambda: |-
          id(rgb8x32)->icon_clock("another_one_icon", 1440, 10, false, 255, 140, 0);

Clock and Date with icon:

  on_start_running:
     then:
       lambda: |-
          id(rgb8x32)->icon_clock("another_one_icon", 1440, 10, false, 255, 140, 0);
          id(rgb8x32)->icon_date("another_one_icon", 1440, 5, true, 255, 140, 0);

  on_empty_queue:
    then:
      lambda: |-
          id(rgb8x32)->icon_clock("another_one_icon", 1440, 10, false, 255, 140, 0);
          id(rgb8x32)->icon_date("another_one_icon", 1440, 5, true, 255, 140, 0);

Or without icon:

  on_start_running:
     then:
       lambda: |-
          id(rgb8x32)->clock_screen(1440,10, false, 255, 140, 0);
          id(rgb8x32)->date_screen(1440,5,true, 255, 140, 0);

  on_empty_queue:
    then:
      lambda: |-
          id(rgb8x32)->clock_screen(1440,10, false, 255, 140, 0);
          id(rgb8x32)->date_screen(1440,5,true, 255, 140, 0);

That's why I can't tell if the color of the date will change after 24 hours.

id(rgb8x32)->set_clock_color(255, 0, 0); // Red color
id(rgb8x32)->set_clock_color(0, 255, 0); // Green color
id(rgb8x32)->set_clock_color(0, 0, 255); // Blue color

from esphomatrixv2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.