diff --git a/components/ehmtxv2/__init__.py b/components/ehmtxv2/__init__.py index 6d5bbe9..c97fb2b 100644 --- a/components/ehmtxv2/__init__.py +++ b/components/ehmtxv2/__init__.py @@ -179,51 +179,6 @@ EHMTX_SCHEMA = cv.Schema({ CONFIG_SCHEMA = cv.All(font.validate_pillow_installed, EHMTX_SCHEMA) -SET_COLOR_ACTION_SCHEMA = cv.Schema( - { - cv.GenerateID(): cv.use_id(EHMTX_), - cv.Optional(CONF_RED,default="80"): cv.templatable(cv.uint8_t), - cv.Optional(CONF_BLUE,default="80"): cv.templatable(cv.uint8_t), - cv.Optional(CONF_GREEN,default="80"): cv.templatable(cv.uint8_t), - } -) - -SetTodayColorAction = ehmtx_ns.class_("SetTodayColor", automation.Action) - -@automation.register_action( - "ehmtx.today.color", SetTodayColorAction, SET_COLOR_ACTION_SCHEMA -) -async def ehmtx_set_today_color_action_to_code(config, action_id, template_arg, args): - paren = await cg.get_variable(config[CONF_ID]) - - var = cg.new_Pvariable(action_id, template_arg, paren) - template_ = await cg.templatable(config[CONF_RED], args, cg.int_) - cg.add(var.set_red(template_)) - template_ = await cg.templatable(config[CONF_GREEN], args, cg.int_) - cg.add(var.set_green(template_)) - template_ = await cg.templatable(config[CONF_BLUE], args, cg.int_) - cg.add(var.set_blue(template_)) - return var - -SetWeekdayColorAction = ehmtx_ns.class_("SetWeekdayColor", automation.Action) - -@automation.register_action( - "ehmtx.weekday.color", SetWeekdayColorAction, SET_COLOR_ACTION_SCHEMA -) - -async def ehmtx_set_week_color_action_to_code(config, action_id, template_arg, args): - paren = await cg.get_variable(config[CONF_ID]) - - var = cg.new_Pvariable(action_id, template_arg, paren) - template_ = await cg.templatable(config[CONF_RED], args, cg.int_) - cg.add(var.set_red(template_)) - template_ = await cg.templatable(config[CONF_GREEN], args, cg.int_) - cg.add(var.set_green(template_)) - template_ = await cg.templatable(config[CONF_BLUE], args, cg.int_) - cg.add(var.set_blue(template_)) - - return var - CODEOWNERS = ["@lubeda"] async def to_code(config): diff --git a/wiki/type1.jnx b/wiki/type1.jnx new file mode 100644 index 0000000..7ffcf6a Binary files /dev/null and b/wiki/type1.jnx differ diff --git a/wiki/type1.yaml b/wiki/type1.yaml new file mode 100644 index 0000000..b6e87ab --- /dev/null +++ b/wiki/type1.yaml @@ -0,0 +1,118 @@ +substitutions: + devicename: ehmtx8266 + ledpin: GPIO02 + +external_components: + - source: + type: local + path: ./EspHoMaTriXv2/components + refresh: 60s + +esphome: + name: $devicename + comment: 8x32 RGB Display in bedroom + +binary_sensor: + - platform: status + name: "$devicename Status" + +esp8266: + board: d1_mini + +font: + - file: EHMTXv2.ttf + id: default_font + size: 16 + glyphs: | + !"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz€@üöäÜÖÄß + +logger: + level: WARN + +# Enable Home Assistant API +api: + +ota: + password: !secret ota_password + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + +light: + - platform: neopixelbus + id: ehmtx_light + type: GRB + variant: WS2812 + pin: $ledpin + num_leds: 256 + color_correct: [30%, 30%, 30%] + name: "$devicename Light" + restore_mode: ALWAYS_OFF + effects: + - e131: + universe: 1 + channels: RGB + on_turn_on: + lambda: |- + id(ehmtx_display)->set_enabled(false); + on_turn_off: + lambda: |- + id(ehmtx_display)->set_enabled(true); + +e131: + method: multicast # default: register E1.31 to Multicast group + +time: + - platform: homeassistant + id: ehmtx_time + on_time: !include ehmtx_on_time.yaml + +display: + - platform: addressable_light + id: ehmtx_display + addressable_light_id: ehmtx_light + 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: true + rainbow_interval: 32 + matrix_component: ehmtx_display + time_component: ehmtx_time + icons2html: true + default_font_id: default_font + special_font_id: default_font + special_font_yoffset: 6 + default_font_yoffset: 6 + icons: + - id: xani + lameid: 6075 + - id: xsta + lameid: 11236 + - url: https://developer.lametric.com/content/apps/icon_thumbs/48720.gif + pingpong: true + id: pipo + frame_duration: 300 + - lameid: 5965 + frame_duration: 180 + id: d180 + - lameid: 5965 + frame_duration: 80 + id: d080 + - id: fullscreen + file: sample8x32.gif + - id: samplegif + file: sample8x8.gif diff --git a/wiki/ulanzi.jnx b/wiki/ulanzi.jnx new file mode 100644 index 0000000..143e7fb Binary files /dev/null and b/wiki/ulanzi.jnx differ