2022.12: It does matter!

Per github, you can edit custom_components/mass/manifest.json and change music-assistant==1.8.7 to music-assistant==1.8.8. It should start, but won’t be fully functional.

Another flawless upgrade.

(Of course, I only have 9 integrations :slightly_smiling_face:)

Great work!

68 posts were split to a new topic: 2022.12: Scrape and scan interval

What python script are you referring to? It might be well known but still I haven’t heard of it.

1 Like

Not sure why people are thrilled to see the next proprietary protocol being integrated in an open source project, but everybody to his or her liking :slight_smile:

What does sound interesting is using Shellys as BLE range extenders.
I don’t have any Plus devices yet (and don’t really see any point in upgrading as they offer no real benefit to me), but will this feature require flashing ESPHome or will it work out of the box with stock firmware?
And most importantly: will it work with Tasmota firmware?

Thsnks guys! I really love the new colours!

What is the code to write manually in the configuration.yaml?
Tanks

Yes. Input datetime in dashboards is broken. Not even seeing the date part anymore :face_with_monocle:

What is the difference between these two?

Local Calendar - Home Assistant (home-assistant.io)

Calendar - Home Assistant (home-assistant.io)

this is my version of it, and there’s a link in the python to the community topic

""" This script creates a sensor that a counts down to the next occurrance """
"""   of a date, like a birthday or anniversary and gives the number of    """
"""                         years as an attribute                          """


"""       Requires python_script: to be enabled in you configuration       """


""" Usage:                                                                 """
"""                                                                        """
""" automation:                                                            """
"""   alias: Refresh John's birthday sensor                                """
"""   trigger:                                                             """
"""     platform: time                                                     """
"""     at: '00:00:01'                                                     """
"""   action:                                                              """
"""     service: python_script.date_countdown                              """
"""     data:                                                              """
"""       name: John                                                       """
"""       type: birthday                                                   """
"""       date: 17/08/1971   #DD/MM/YYYY                                   """


"""  This will create a sensor with entity_id sensor.birthday_john and a   """
"""  friendly name of 'John's birthday' . The sensors value will be the   """
"""   number of days until the birthday, and the attribute 'years' will    """
"""          show how old John will be on his next birthday                """
"""https://community.home-assistant.io/t/python-script-for-countdown-to-birthdays-anniversaries-significant-dates/87597"""


today = datetime.datetime.now().date()

name = data.get('name')
type = data.get('type')
event = data.get('event')
sensorName = "sensor.{}_{}".format(type , name.replace(" " , "_"))

dateStr = data.get('date')
dateSplit = dateStr.split("/")

dateDay = int(dateSplit[0])
dateMonth = int(dateSplit[1])
dateYear =  int(dateSplit[2])
date = datetime.date(dateYear,dateMonth,dateDay)

thisYear = today.year
nextOccur = datetime.date(thisYear , dateMonth , dateDay)

numberOfDays = 0
years = int(thisYear) - dateYear


if today < nextOccur:
  numberOfDays = (nextOccur - today).days

elif today > nextOccur:
  nextOccur = datetime.date(thisYear+1 , dateMonth , dateDay)
  numberOfDays = int((nextOccur - today).days)
  years = years+1

phrase = 'dag' if numberOfDays == 1 else 'dagen'

hass.states.set(sensorName,numberOfDays,
  {
    'entity_picture': '/local/family/{}.jpg'.format(name.lower()),
    'unit_of_measurement': phrase,
    'friendly_name': '{} wordt {} over:'.format(name, years),
    'persoon': name,
    'type': '{}'.format(type.title()),
    'years': years,
    'original_date' : '{}-{}-{}'.format(dateDay,dateMonth,dateYear)
  }
)

binarysensorName = 'binary_sensor.' + sensorName.split('.')[-1]
binarysensorState = 'on' if numberOfDays == 0 else 'off'
hass.states.set(binarysensorName, binarysensorState,
  {
    'persoon': name,
    'type': '{}'.format(type.title()),
    'years': years,
    'original_date' : '{}-{}-{}'.format(dateDay,dateMonth,dateYear),
    'event': event,
    'name': name
  }
)

run it like:

automation:

  - alias: Refresh date countdown sensors
    id: refresh_date_countdown_sensors
    mode: restart
    trigger:
      - platform: state
        entity_id: sensor.date
      - platform: homeassistant
        event: start
    action:
      - service: python_script.date_countdown
        data:
          name: Me
          type: verjaardag
          date: 01/02/1964
          event: jarig

and sensos and binary sensors are created. You can then use these for all kinds of automations and triggers in HA, use the attributes etc.

Or simply list them all in a singel card, with this decluttering template

card:
  type: custom:template-entity-row
  entity: '[[entity]]'
  state: >
    {% if states[config.entity] is not none %}
    {{states(config.entity)}} {{state_attr(config.entity,'unit_of_measurement')}}
    {% else %} Not yet set
    {% endif %}
  secondary: >
    {% if states[config.entity] is not none %}
    {{state_attr('[[entity]]','type')}}: {{state_attr('[[entity]]','original_date')}}
    {% else %} Not yet set
    {% endif %}

The former is a new calendar which is hosted on your home assistant. The latter provides the framework to use an existing caldav or google calendar in home assistant.

The old one also shows events that are generated by HA, and unrelated to ical or google calendar. I think that is why it is puzzling to have the new one.

The old one

1 Like

Well, same game as after the previous release when card borders were introduced. Now the user questions are coming in again as to why the accent colours have suddenly disappeared.

on the colors of the various domains , I’ve just found out we still need to set the state_color: true to have them use the colors in the entities cards. Which is odd, because the more-info of the entity does actually use the domain state color by itself.


this simply is a bug:

binary_sensor.opentherm_heating ‘on’, in other words heating is now represented as light blue…?

Great work, thank you!

One little more Thing would be great… If it would be possible to substract two or more sensor entities and not only sum them. Small Addition but for people with Solar input it would be fantastic. Thanks a lot

I added local calendar integration. Used the card calendar where I added a local calendar entity, the calendar was displayed, but I have no idea how to add an event to the local calendar?

I cannot use device_tracker.see service anymore? On startup I get errors about it. I use it to transform input boolean as a device tracker

Very great project.
But the disk led of my case is always blinking since this update (2022.12.0) last morning.
Any idea ? It was not the case before the update and I have not change anything nor install something else.

Well, well… This reminds me how the things were with Firefox and probably still are. Core team started to follow their vision how the things should look like, and this probably is one of the main reasons why their user base has dramatically dropped over the last years. Especially after catastrophes like Proton UI and such.

People were just scared to update anymore, fearing of “what they are going to break this time”. I personally jumped of the train and have moved to Vivaldi as my main browser. Things seem to be much more consistent there, although development is still going on under the hood.

People must have possibility to choose. Colors and how things look like are important to people, even if you are not a theme developer.

It is no that easy just to switch systems, when you are dealing with automation, but history and years working as business consultant have taught me, that one should build everything in one’s life so, that if necessary, it is easy to vote with one’s feet, if ever necessary.

For now, I’m lazily following the discussion and trying to get some kind of understanding what this UI policy is going to look like and what kind of work maintaining the things set to my personal liking is going to require in the future.

Have not updated yet.

6 Likes

First of all, thanks for the work that you all put into HA!
I agree with Trilliard. A possibility to perform a subtraction directly in a helper would be great. Perhaps it would be possible to add “signs” for each added entity in the already existing sum helper? In that way one could chose to add or subtract each added entity to/from the sum helper entity.