homeassistant

175 readers
1 users here now

Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io

founded 1 year ago
MODERATORS
1
 
 

I know enough to be dangerous, so consider me a novice. Explanation below. I'm looking for no hassle light bulbs for home assistant.

Are there any smart light bulbs that do not require the use of an application to start some sort of setup for home assistant specifically with a Zigbee controller? I'm getting increasingly frustrated by not only the confusion generally in the spacedue to the high number of options and increasing centralization, but also just trying to find something that works without an additional hassle. Any recommendations appreciated by US based if that helps.

I'm using a conbee 2 controller for Zigbee with a Raspberry Pi 3B running home assistant.

Most frequently I'm annoyed because I got something that uses hubspace, which in theory I thought should work, but the application is required to set up the bulb and it will not run on my phone at all, and I'd prefer not to use it in the first place.

2
 
 

I’ve recently found a very nice and simple code/text editor for iPhone and iPad called Runestone. It seems to use the Files app as its base for navigating the files on your device but is able to open and edit yaml and other code files. I know most folks probably use the VS Code addon but on an iPhone there isn’t much screen real estate and it just didn’t work well for me personally. As a non-coder that learned yaml in the early Home Assistant days, I got used to the File Editor Addon . I was looking for something simple like that but more functional when using i-devices. Runestone looks and works great so far. Since it’s based on the native Files app, you can use samba share to access the config files and with Tailscale, you can access from anywhere.

I just wanted to let folks know because I’m really liking it so far. $10 for premium some extra features.

I’m not affiliated, just enjoying it so far.

3
 
 

Hi all!

I searched to see if a thread was already created for this discussion but I didn't see one. Does anyone have any recommendations for a Home Assistant local only (preferably zwave or ZigBee) deadbolt? In the past I've had a Schlage unit that worked great, when it worked. It often had problems, battery life wasn't great, was on security 0, and wasn't water tight enough for my application as water damage finally killed this one. They're also a bit on the pricier side at >$200. Any other brands or technologies you would recommend?

4
 
 

I’m familiar with IR but like… does it need to be in the same room as my tv? My entire house has RF fans and I’d love to buy one device but idk if it’ll cover the whole 1700 sqft, or even other closed rooms. IR is a nice to have but I mostly care about RF. Does that need to be in the same room? Thanks y’all.

5
 
 

Anyone else using the official Android app and constantly bombarded with "delete_alert" notifications? Google is useless these days, but when I've looked into this before it appears this might be related to the app trying to update or remove a previous notification that is no longer relevant.

I don't recall ever seeing this by itself. There always seems to be another notification, usually updates for HA core or HACS modules.

Example: https://imgur.com/a/UEKZUKg

6
 
 

Hi, want to share my script how you make a good tts announcement on sonos.

How it works:

  • triggered by an automation like this
          - service: script.turn_on
            entity_id: script.jarvis_speak
            data:
              variables:
                mymessage: |
                  {{ state_attr('sensor.notification_message', 'msg') }}
                myplayer: media_player.sonos_bedroom

  • the script is using an input_boolean to flip so that one announcement is done at a time, that's why I have the "jarvis_announcement_wait" boolean
  • it uses "input_number.jarvis_<>_volume to be able to adjust the volume per room for the announcements
  • it uses a little "ding" sound prior to the announcement
  • it uses piper and with trial end error I figured out how many word per minute "ryan" is speaking so that the script ends exactly at the time when the tts announcement has finished in case there are multiple announcements to be made per room
alias: jarvis_speak
sequence:
	  - repeat:
		  while:
			- condition: state
			  entity_id: input_boolean.jarvis_announcement_wait
			  state: "on"
		  sequence:
			- delay:
				hours: 0
				minutes: 0
				seconds: 1
				milliseconds: 0
	  - service: input_boolean.turn_on
		target:
		  entity_id:
			- input_boolean.jarvis_announcement_wait
		data: {}
      - service: media_player.play_media
        data:
          media_content_id: /local/jarvis-chime.wav
          media_content_type: music
          announce: true
          extra:
            volume: >-
              {{ states('input_number.jarvis_' + myplayer |
              replace('media_player.','') + '_volume')  }}
        target:
          entity_id: "{{ myplayer }}"
      - delay:
          seconds: 1
      - service: media_player.play_media
        data:
          media_content_type: music
          announce: true
          media_content_id: >-
            media-source://tts/tts.piper?message={{ mymessage  | replace('&',
            'and') }}
          extra:
            volume: >-
              {{ states('input_number.jarvis_' + myplayer |
              replace('media_player.','') + '_volume')  }}
        target:
          entity_id: "{{ myplayer }}"
      - delay:
          seconds: >
            {% set text = mymessage | replace('&', 'and') %} {{ (text.split(' ')
            | length * 60 / 150) | round(0, 'ceil') }}
	  - service: input_boolean.turn_off
		target:
		  entity_id:
			- input_boolean.jarvis_announcement_wait
		data: {}
mode: queued
max: 10

7
 
 

Want to share my config to make sonos playlist buttons in dashboard as the picture shows:

How to?

  • enable "sonos_favorites" sensor in settings > devices > entities
  • goto hacs and install frontend auto-entities card
  • goto hacs and install button-card
  • put the below in your dashboard
      - type: custom:auto-entities
        view_layout:
          grid-area: mb
        card:
          square: true
          type: grid
          columns: 5
        card_param: cards
        sort:
          method: state
        filter:
          template: >
            {% for item in state_attr('sensor.sonos_favorites',
            'items').values() %} {{
                    {
                        'entity': 'null',
                        'name': item,
                        'icon' : 'mdi:music',
                        'type': 'custom:button-card',
                        'template': 'base_music_switch',
                        'tap_action' :
                        {
                          'action': 'call-service',
                          'service': 'script.multimedia_sonos_play_selected_playlist',
                          'service_data': 
                           {
                             'media_player': 'media_player.sonos_livingroom',
                             'source': item 
                             
                           }                  
                          }
                    }   
            }}, {% endfor %}


  • put a template for the custom button in your lovelace file to format the button
  base_music_switch:
    show_icon: false
    show_state: false
    show_name: true
    aspect_ratio: 1/1
    tap_action:
      haptic: success
    styles:
      card:
        - border: transparent
        - border-radius: 8px
        - box-shadow: |
            [[[
                if (states['sensor.theme_style'].state == 'light')
                {    
                    return ' -3px -3px 3px rgb(255, 255, 255, 0.5),  3px 3px 3px rgb(0,0,0,0.05), inset 1px 1px 2px rgb(255, 255, 255, 0.8), inset -1px -1px 2px rgb(0,0,0,0.05)';                                        
                }
                else
                { 
                    return ' -2px -2px 3px rgb(102, 102, 102, 0.1),  3px 3px 3px rgb(0,0,0,0.9), inset 1px 1px 2px rgb(102, 102, 102, 0.3), inset -1px -1px 2px rgb(0,0,0,0.35)';                          
                }
            ]]]
      lock:
        - height: 10px
        - width: 10px
        - justify-content: flex-end
        - align-items: flex-end
      grid:
        - grid-template-areas: |
            "n"
        - grid-template-columns: 1fr
        - grid-template-rows: auto
      name:
        - padding-left: 5px
        - padding-right: 5px
        - width: 90%
        - word-break: break-word
        - overflow: hidden
        - line-height: 1.3
        - display: block;/* or inline-block */
        - text-overflow: ellipsis
        - max-height: 3.9em
        - white-space: normal
        - color: var(--divider-color)
    extra_styles: >
      @media (min-width: 1800px) { #name{ font-size: 60%; } } @media (max-width:
      1800px) { #name{ font-size: 60%; }  } @media (max-width: 1000px) { #name{
      font-size: 60%; } } 

  • when you click an icon a script is started
  • add a script, my example is highly customized to my auto follow feature that I implemented

alias: multimedia_sonos_play_selected_playlist
sequence:
  - choose:
      - conditions:
          - condition: template
            value_template: >
              {{ states('input_boolean.multimedia_' + media_player |
              replace('media_player.sonos_','') + '_automusic') == 'on' }}
        sequence:
          - service: input_boolean.turn_off
            data: {}
            target:
              entity_id: input_boolean.multimedia_sonos_autofollow
          - service: media_player.shuffle_set
            data:
              shuffle: true
            target:
              entity_id: |
                {{ media_player }}
          - service: media_player.select_source
            data:
              source: |
                {{ source }}
            target:
              entity_id: |
                {{ media_player }}
          - delay:
              hours: 0
              minutes: 0
              seconds: 4
              milliseconds: 0
          - service: input_boolean.turn_on
            data: {}
            target:
              entity_id: input_boolean.multimedia_sonos_autofollow
    default:
      - service: media_player.shuffle_set
        data:
          shuffle: true
        target:
          entity_id: |
            {{ media_player }}
      - service: media_player.select_source
        data:
          source: |
            {{ source }}
        target:
          entity_id: |
            {{ media_player }}
mode: single


8
 
 

Hi, my evaporative humidifier just broke and it is time for a new one. What I am looking for

  • no cloud/account needed, just local, zigbee, zwave, wifi you name it
  • easy integration with hass
  • easy to clean
  • low maintenance fees (filters and stuff)
  • big rooms 50sqm+ so that it has enough "ooompf" Any ideas highly appreciated
9
 
 

Hey all! I'm looking for a mythical local-only (Wifi, Z-Wave, or Zigbee) smart light switch that has a good feel and user experience when manually switching on/off. What I mean by that: I think my ideal UX is some sort of hard rocker switch like the very much not smart Leviton Decora switches. You hit the top of the rocker for on or hit the bottom of it for off, and it has a good, solid feel with each state change.

The problem comes when making one of these switches "smart," e.g. stuffing a Shelly or something behind it. The up/down directions won't correspond to on/off anymore, because the smart switch can turn the light on/off without affecting the rocker direction. Maybe this is okay and I just need to deal with it? Does anyone with a similar setup find this annoying? I guess it's no different than a traditional three-way switch.

Another option is to take out the dumb switches and replaces them entirely with smart ones. Almost all smart switches are single on/off toggle buttons (some have two buttons), sidestepping the up/down state problem described above. But I'm not sure I'd like the feel of a squishing a button into the wall instead of a tilting a rocker. I do have a few of an older model of this Eva Logik switch, which has two buttons and kinda sorta mimics the look of the Decoras—but it doesn't actually rock like traditional switches. The up/down buttons are more like clicky mouse buttons, and not the best tactile experience IMO. Plus, newer models apparently are no longer Tuya-convertible to Tasmota...

So am I just being too picky here? Does anyone else experience similar issues?

EDIT: Here's a TL;DR of the suggestions below, for anyone also looking to solve a similar probem:

  • Use a Jasco/GE Enbrighten series smart switch (Z-Wave, Zigbee, or Wifi)
  • Use a TPLink Kasa switch (Wifi via HA tplink integration)
  • Try an Innovelli Blue switch (Zigbee; there's also a Z-Wave variant)
  • Just deal with your OCD and put a Shelly behind a dumb switch
10
 
 

cross-posted from: https://lemmy.world/post/110673

Hey all,

i want to hack a portable AC. The devices communicates via UART between Mainboard and control unit (LCD and Buttons). As we still want to use the original controls, i had the idea to put an ESP32 in the middle of the communication (using UART2 for the mainboard and UART3 for the control board).

I don't want to reverse engineer the whole protocol, only the relevant parts. So, i need a way to forward all messages in both directions, to make this work as it should.

Has anybody done such a thing already? Or has any tips how to do it.

I'm fluent in C++, so there is not barrier here, but i am new to the codebase of ESPHome

11
 
 
  • I have no garage door opener so I added a tag in my car to open the smart garage without having to open the app and fiddle with things.
  • I added a tag to our light switch that turns on our bedroom lamp (softer, more pleasant light at night).
  • I added a door tag to unlock the door (no information contained on the tag so nobody can break in).
  • I added a tag that pauses an automation at night so my stair lights don't come on with motion sensing.

This is literally just the tip of the iceberg. I think of a new one every couple hours. Anyone have any other cool ones to share?

12
 
 

Hello. Can anyone recommend a smart button that I could use as a connected doorbell? We already have camera coverage on the front porch so no need for video doorbell. Would prefer zwave but am open to zigbee as well. Our front porch is covered but am concerned about using an indoor button outside, mostly because of temps, esp in winter.

13
 
 

Wanted to take a moment and welcome all the new subscribes to the community. At the time of writing this there are more than 1,500 members!

Is anyone interested in helping moderate this community? If so, send me a private message and we can have a discussion. I know if the community continues to grow I will need assistance.

14
 
 

I hope this allows for tighter integration into Home Assistant.

15
 
 

To expand on a previous poster asking about local only devices in general...

Has anyone found a reliable local only doorbell? I've been meaning to replace my Ring doorbell ever since Amazon bought them. I finally bought a Reolink WiFi doorbell and it looks great and was really easy to set up without Internet or their app, BUT...

It doesn't work. Capture to FTP gives me nice clear images but the videos are corrupt, maybe truncated. I can't even open them with VLC.

I tried installing an SD card and then moving the SD card to my laptop. The videos on there play for a few seconds and then freeze.

Reolink support hasn't responded to any of my questions, which is another minus for them.

I did notice that the unit seems to run very hot. Did I just get a dud?

So are there any alternatives? Should I just try buying another of these? At least returns (Amazon, Walmart) are easy.

16
 
 

What kind/brand of devices do you recommend and where do your source them? Things like smart outlets, bulbs, sensors, etc.

I have a hard time sourcing gear because it's all either locked to Amazon/Google or requires the manufacturer's cloud services and their dedicated app.

I'm looking for devices that can work completely offline and only communicate with my HA/MQTT or at least a local base station that can bridge to HA.

For the last few years, I've been buying bulbs/outlets from AliExpress with Tasmota pre-flashed. Before that, I was ordering them from Amazon and re-flashing them, but that was always a crapshoot as not all of them were compatible with tuya-convert. They're also ridiculously difficult to disassemble to flash manually.

Anybody willing to share some tips to source some new devices?

Edit: I've also built a few custom sensors with ESP8266 and ESP-Home but they're not particularly pretty.

Edit 2: Thanks everyone! I think I'm going to look into some Zigbee devices and bridges. That sounds like the most "open" way to expand my smart home gear.

17
18
17
submitted 1 year ago* (last edited 1 year ago) by DrM@lemmy.world to c/homeassistant@lemmy.world
 
 

I updated to 2023.6.1 on my supervised installation. Now I woke up twice already to my HA not running anymore. Restarting the Raspi fixed the issues both time. If you run HA supervised, I advice you to wait with the update for some time. For me, I will take this as a lesson and go back to HAOS

Edit: changed version to 2023.6.1

19
15
Chore tracking (community.home-assistant.io)
 
 

Does anyone know of a simpler chore tracker than Grocy? I essentialy just want reminders for recurring tasks like rinsing heat pump filters, oiling wooden work surfaces etc.

Grocy seems like overkill for that, but maybe it's the easiest option?

20
 
 

Show off your dashboard, or link to your favorite(s).

21
 
 

Any ideas why I might be getting this error sporadically on the Android app (Pixel 6 Pro)? I'm running the latest app version and HA is at 2023.6.1.

The app had been running amazing lately until the 2023.6 updates.

22
 
 

For a couple of years now I’ve been trying to make peace with the scene editor and scenes in general. I’m about to spend hours switching to either automations or back to appdaemon scripts and wanted to see if maybe I just don’t understand the model and there's a better way to use it.

I keep getting burned by unexpected changes to entities and devices and just plain wrong output that appears to only be fixable by removing and re adding devices or entities in specific orders (root cause is #2 below).

Use case is pretty table stakes for HA: I want to operate about 80 'common area' lighting devices in a large house on global events (lights on at sunset, off in the morning for example).

-Bp9

Tldr; Details

I have about 120 distinct lighting devices on several integrations (wled, MQTT, ISY, and zwave) many with dozens of entities; and another 50 devices/600 entities unrelated to lighting. I'm running the hassos image on a VM on a Rocky Linux intel server with plenty of memory and cores (I used a PI 4B with an SSD for a while but it didn't have enough CPU for the heavyweight Python code in HA).

Issue #1: scene editor interference

The scene editor on the client sort of checks out a scene and sets all the devices up to match it in real-time, if you end up with multiple tabs open in the same scene changes get lost overwritten when the web socket disconnects - this is PEBCAK (user error) but it’s really hard in practice to deal with

Issue #2: Conflicting entity state

I have 30 or so WLED devices on the wled integration. These each provide multiple entities that are in conflict with each other per device (preset select vs segment power state for example).

When the scene editor tries to save all this state it writes conflicting state on the multiple entities on the same device. One could say I should disable the dozens of entities on each of the 30 devices but that is hours of work in the clunky ui; I read the code and found where the JSON config files are hidden now, but it’s still painful to work with because “ha core restart” takes a couple of minutes to test each change. I also frequently do want the multiple 'conflicting' entities (manual dashboard control on one, presets on scenes).

There isn’t enough data in the entities to really capture the state and with WLED the entities come and go dynamically (depending on the number of segments defined in a wled preset and where it is in a playlist). In this case I can put the blame on my edge case use of the wled integration and its immature state. This all got a lot better when you were allowed to set entities in scenes instead of whole devices, but it’s a huge amount on manual ui drudge work to go and rework 30 devices, and I’ve tried and not yet succeeded several times due to the next issue…

Issue #3: scene corruption while editing live

There is no way to edit a scene without having it active, and if anything changes while it’s active the changes are written to the scene. This is impractical if you have motion detectors or other automations running while trying to make a large change (or a user is annoyed when a light goes on or off as you edit the scene and flips it back the way they want it before you finish your edit). It also means you can’t edit scenes at night with people in the house.

23
8
Automate Automation (automationgenerator-hasontal.b4a.run)
 
 

Someone over at that other site made this. It's using ChatGPT to create automations. Pretty cool if you ask me.

All credit to Tal Hason who made it. It's in the About page on the site, so It's not like I'm doxing someone here.

24
 
 

I figured we could all share some of the cooler things we've done to get the conversation moving in here.

Here are some of the automations I'm proud of and get the most use out of.

Blinds and Lighting

  • Open and close the blinds (Ikea Fyrtur) according to the light levels outside
  • If a window is open, the blind will only close to 50%, but it will close automatically after the window is closed
  • Turn all lights off when the blinds are opened, and turn lights on in occupied rooms when the blinds are closed
  • Automatically close the blinds in the bedroom and bathroom when the shower is on. Open them after we leave the master suite.

Websites

  • (Selenium) Auto login to Amazon to check on the status of my Kindle daily reading streak and notify me if I forget to read. We must keep the streak intact!
  • Auto categorize new transactions in YouNeedABudget and mark them as approved, as well as pull my net worth into Home Assistant
  • Get my most-listened to tracks and artists from Last.FM and pull those into Home Assistant
  • Notify me if there are documents in my Paperless-NGx server that need to be categorized and filed

Reminders

  • When I walk in the door, announce any outstanding Todoist tasks marked with the @alert label so I know to do it before I sit down. Examples are to change the furnace filter or Venmo my friend for Youtube TV
  • I run OCR on the camera feed from my garage camera to determine whether the bins are in the garage. The bins say Trash and Recycling on top, so I look for those words in the image. If they are in the garage in the evening before trash day, I receive an alert

Media and Torrenting

  • Notify me and display a badge in Home Assistant when there is a pending request in Overseerr
  • (Selenium) Log into my favorite private torrent tracker website from Node-RED to check whether I need to take any actions

HVAC

  • Preheat or pre-cool the house prior to peak electricity pricing going into effect. During peak hours, auto adjust the thermostat to prevent it from running
  • Turn the thermostat off if there are windows open. Automatically restore previous setting (cool or heat) when all windows are closed.
  • Turn the bathroom fan on after the shower is turned off and no one is around. Turn it off after 80 minutes or the humidity in the bathroom is within 10% of the humidity in the bedroom, whichever comes first.

Misc

  • Node-RED monitors the status of my UPSes for my servers. If the battery drops below 50% while the power is out, it initiates graceful shutdowns of my Synology and other servers
  • Auto sort the Home Assistant grocery list upon adding a new item
25
 
 

Hi,

wanted to share my recent automation. What it does: Whenever you want to watch a movie and use chromecast, it looks up the title on IMDB and gets the rating. Then announces the rating via tts.

Sorry for bad formatting - I don't get this to work here

  • Install pyscript from hacs
  • Create a pyscript folder in your config
  • In your pyscript folder create a file "requirements.txt"
  • Write "cinemagoer" and save
  • Create a file "movieinfo.py"
  • Add the following python code
from imdb import Cinemagoer

import sys

import requests

@service
def multimedia_getmovieinfos(mytitle=None):
    """yaml
    name: get imdb movie infos
    description: obtain infos from imdb for a movie, stored in multiple input_text sensors
    fields:
        mytitle:
            description: provide the movie title
            example: Rollo Aller
            required: true
"""

    ia = Cinemagoer()
    search = task.executor(ia.search_movie, mytitle)

    for i in range(len(search)):
      if i == 0:
        id = search[i].movieID
        info = task.executor(ia.get_movie, id)
        genre_list = info.data['genres']
        service.call("input_text", "set_value", blocking=True, limit=10, entity_id="input_text.multimedia_current_movie_title", value=search[i]['title'] + ' ('+str(info.data['year'])+')')
        
        service.call("input_text", "set_value", blocking=True, limit=10, entity_id="input_text.multimedia_current_movie_genre", value=','.join(map(str, genre_list)).replace(',', ', '))

        service.call("input_text", "set_value", blocking=True, limit=10, entity_id="input_text.multimedia_current_movie_rating", value=( str(round(info.data['rating'], 2))))
        
        if 'plot outline' in info.data:
            service.call("input_text", "set_value", blocking=True, limit=10, entity_id="input_text.multimedia_current_movie_plot", value=info.data['plot outline'][:255])
        else:
            service.call("input_text", "set_value", blocking=True, limit=10, entity_id="input_text.multimedia_current_movie_plot", value="no plot available")

  • Create four input_text sensors in homeassistant
input_text:

  multimedia_current_movie_title:
    name: Multimedia Current Movie Title
    
  multimedia_current_movie_rating:
    name: Multimedia Current Movie Rating
    
  multimedia_current_movie_genre:
    name: Multimedia Current Movie Genre
    
  multimedia_current_movie_plot:
    name: Multimedia Current Movie Plot
    max: 255
  • Create an input_number sensor for the rating threshold
  multimedia_tv_minimum_rating:
    name: Movie Minimum Rating
    icon: mdi:brightness-percent
    mode: slider
    step: 0.1
    max: 10
    min: 0
    initial: 5.0
  • Add an automation to trigger getting the movie infos
alias: multimedia_tv_aerocast_get_movie_infos
description: ""
trigger:
  - platform: state
    entity_id:
      - media_player.aerocast
    to: playing
    id: "1"
  - platform: state
    entity_id:
      - media_player.aerocast
    from: playing
    id: "2"
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: "1"
        sequence:
          - service: pyscript.multimedia_getmovieinfos
            data:
              mytitle: |
                {{ state_attr('media_player.aerocast', 'media_title') }}
  - choose:
      - conditions:
          - condition: trigger
            id: "2"
        sequence:
          - service: input_text.set_value
            data:
              value: " "
            target:
              entity_id: input_text.multimedia_current_movie_genre
          - service: input_text.set_value
            data:
              value: " "
            target:
              entity_id: input_text.multimedia_current_movie_title
          - service: input_text.set_value
            data:
              value: " "
            target:
              entity_id: input_text.multimedia_current_movie_rating
          - service: input_text.set_value
            data:
              value: " "
            target:
              entity_id: input_text.multimedia_current_movie_plot
mode: single




  • Add an automation to announce whenever you play your movie - I do that through mqtt. Adjust to your liking :)

alias: jarvis_notify_movie_rating
description: ""
trigger:
  - platform: state
    entity_id:
      - input_text.multimedia_current_movie_rating
condition:
  - condition: template
    value_template: "{{ states('input_text.multimedia_current_movie_rating') != ' ' }}"
action:
  - choose:
      - conditions:
          - condition: template
            value_template: >-
              {{ states('input_text.multimedia_current_movie_rating') |
              float(default=0) <
              states('input_number.multimedia_tv_minimum_rating') |
              float(default=0) }}
        sequence:
          - service: mqtt.publish
            data:
              topic: notifications
              payload_template: |
                { 
                  "heading": "Movie underrated",
                  "details":
                    { 
                      "msg": "Do you really want to watch {{ state_attr('media_player.aerocast', 'media_title') }}? It only has a rating of {{ states('input_text.multimedia_current_movie_rating') }} on I M D B.",
                      "player": "livingroom",
                      "importance": "high",
                      "received": "{{ now().strftime("%H:%M:%S") }}" 
                    }
                }
      - conditions:
          - condition: template
            value_template: >-
              {{ states('input_text.multimedia_current_movie_rating') |
              float(default=0) >=
              states('input_number.multimedia_tv_minimum_rating') |
              float(default=0) }}
        sequence:
          - service: mqtt.publish
            data:
              topic: notifications
              payload_template: |
                { 
                  "heading": "Movie well rated",
                  "details":
                    { 
                      "msg": "Nice choice for a{% if states('input_text.multimedia_current_movie_genre').split(',')[0] | lower | regex_search("[aeiou]")%}n{% endif %} {{ states('input_text.multimedia_current_movie_genre').split(',')[0] | lower }} movie. {{ state_attr('media_player.aerocast', 'media_title') }} has a rating of {{ states('input_text.multimedia_current_movie_rating') }} on I M D B.",
                      "player": "livingroom",
                      "importance": "high",
                      "received": "{{ now().strftime("%H:%M:%S") }}" 
                    }
                }
mode: single
view more: next ›