2022.12: It does matter!

I have such a warm, happy and contented feeling right now. A-mazing. My home automation platform is improved and I didn’t write a single line of code. You spectacular fking legends! Thank you

5 Likes

Since applying update 2022.12; my input_datetime entities have become unusable because the DATE part of the date time entities are un-editable on the dashboards.

Anyone else having this issue??

3 Likes

Climate entities now appear as orange when in Idle (Heat) mode. But not actually heating. They turn Red when actually heating. It is extremely difficult to see the difference between Idle and actually heating. I have spent an hour trying to figure out why the boiler was clearly not running, but it looked like it was in Home Assistant. Please please choose more contrasting colours.

9 Likes

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