Awtrix (clock) notification [Custom Component]

OK able to customize =)
and no icons required by default

service: awtrix.awtrix_bedroom_weather_app
data:
  weather: weather.forecast_home
  home_temperature: sensor.home_temperature
  sun: sun.sun
  moon: sensor.moon_phase
  icons:
      clear-night: "a12181" 
      cloudy: "a2283"
      exceptional: "a2364"
      fog: "17056"
      hail: "a2441" 
      lightning: "a630" 
      lightning-rainy: "a49299" 
      partlycloudy: "a2286" 
      pouring: "a49300" 
      rainy: "a2284" 
      snowy: "a2289" 
      snowy-rainy: "a49301" 
      sunny: "a2282" 
      windy: "a15618" 
      windy-variant: "a15618" 
      full_moon: "2314" 
      waning_gibbous: "2315" 
      last_quarter: "2316" 
      waning_crescent: "2317" 
      new_moon: "2318"
      waxing_crescent: "2320" 
      first_quarter: "2320" 
      waxing_gibbous: "36234" 
      home:  "96"
      sunrise: "485" 
      sunset: "486" 
      unavailable:  "52176"
1 Like

is there an easy way to create a service that publishes the state of a sensor, e.g. the state of charge for a battery that is charging?
In the examples I only see (constant) texts published

no. it’s just service for sending notification and building abstract user apps.

I´m a little confused - how can i add it with HACS?

Sorry, never used HACS. I think you can ask in HACS community.

Same as for everything in HACS:

  1. Search for it
  2. Download it
  3. Restart HA
  4. Configure it

i´m very sorry im very new on homeassitant … moving my smarthome from openhab to ha in these days… Thy solved the problem… Thx for your kick in the richt destination . but i have an other understanding problem… what i have exact to enter in the configuration.yaml only
awtrix:

and the rest where i´ve to put that? in a yaml in a subfolder integrations? or under awtrix:
at the configuration.yaml ?

these is my try at configuration.yaml… but something do not work:

awtrix:
  service: awtrix.push_app_data
  data: 
    device: smartpixel
    name: test
    data:  # Nested data section for app data
      text: "Hello, AWTRIX Light!"
      rainbow: true
      icon: "87"
      duration: 5
      pushIcon: 2
      lifetime: 900
      repeat: 10

no. this NOT for configuration yaml.
this call service code.

1 Like

the custom components located
at /config/custom_components
just create folder awtrix and put content and restart HASS
or

but before please add integration: Download | HACS

1 Like

Integration is allready installed… Thanks a lot for these tipps! Your nice Weather app is running :slight_smile:

1 Like

does this work with Awtrix 3 ?

yep! it’s works

Really nice custom_component, thank you very much. Two questions, is it possible to set a duration for the screens in you Weather app? (Duration tag in data in the yaml did not work)
And second one, tested yesterday, the weather_sun screen worked fine, today it does not come up anymore. The entity in the yaml is sun.sun (and its the same automation that worked yesterday), but in mqtt in can only see an empty string:

image

Duration tag in data in the yaml did not work

ok, i’ll add duration and repeat parameters in next release

today it does not come up anymore.

it’s works =) just you miss =)
sorry, it’s a bug.
wrong time for showing - in UTC :face_with_diagonal_mouth:
i’ll also will fix it

Thank you!

btw. sunrise/sunset events threshold - 30 min…

Thanks for the fast answer. I just took a look in the source code, seems sunset or rise is only displayed 30 minutes before. I did a try and changed from 30 to 180 minutes, and voila:

image

Maybe this would even be nice to be customized by self. But even as it is now, it’s really good, thanks a lot!

You were one minute faster :wink:

will add as you request

service: awtrix.awtrix_bedroom_weather_app
data:
  weather: weather.forecast_home
  outside_temperature: sensor.easyweatherv1_6_4_outdoor_temperature
  home_temperature: sensor.home_temperature
  sun: sun.sun
  moon: sensor.moon_phase
  data:
    weather_sun:
      rainbow: true
      repeat: 3
      duration: 10

so:
key data
then
name of app (weather, weather_night, weather_sun, weather_home)
then any config keys from awtrix light

will add

  data:
    sun_event_minute_threshold: 180
    weather_sun:
      rainbow: true
      repeat: 3
      duration: 10

ver 20240317.01

2 Likes

Perfect, great Job!!! Works right the way you wrote. Now it’s perfect for me :+1:

1 Like