Quantcast
Channel: Configuration - Home Assistant Community
Viewing all 107714 articles
Browse latest View live

Weather forecast card

$
0
0

@richard-g8jvm wrote:

I’d prefer to use Dark Sky for , as the weather.home, from met.no persistantly shows as sunny when there is clear sky at night, and my location is correct, within 300mtrs

the docs show:-

Example

type: weather-forecast
entity: weather.dark_sky

This card works only with platforms that define a weather entity.

E.g., it works with Dark Sky but not Dark Sky Sensor

but on lovelace:-

Does the section on the docs actually mean if Dark Sky sensors are in use elsewhere , that the entity weather.dark_sky is not available ???, which doesn’t seem very logical.

Posts: 8

Participants: 2

Read full topic


Help with this AUTO for NEST

$
0
0

@Neofitos wrote:

Hi,

  • I need this auto, when windows are open, and the NESt if is ON ( heating), else turn off or reduce the tem, in this example is reduce to 18ºC.

  • I need other auto, if the windows is closed else resume for the last temp programed in the NESt , is possible?

- id: '1581282368116'
  alias: Nest Open Widnows
  description: ''
  trigger:
  - minutes: /3
    platform: time_pattern
  condition:
  - condition: state
    entity_id: climate.hallway_thermostat
    state: heat
  - condition: state
    entity_id: binary_sensor.ventana_despax
    state: 'on'
  - condition: state
    entity_id: binary_sensor.ventana_cocina
    state: 'on'
  action:
  - data:
      temperature: 18
    entity_id: climate.hallway_thermostat
    service: climate.set_temperature

Posts: 1

Participants: 1

Read full topic

Trying to get Home Assistant to send me a notification when temperature goes below a certain value

$
0
0

@apastuszak wrote:

I have a Sonoff TH-10 with Tasmota installed that I am using to monitor the temperature of my aquarium via MQTT. I want Home Assistant to send an alert to my phone every time the temperature drops below 76.8. This is the automation I have setup:

TRIGGER
Trigger Type: Numeric State
Entity: sensor.basement_aquarium_temperature
Below: 76.8

ACTION
Action Type: Call Service
Service: notify.ios_andrews_iphone_xr
Service Data: { "data": { "push": { "badge": 5 } }, "message": "Check the basement aquarium temperature!", "title": "Basement Aquarium Temperature Alert" }

The same exact Action configuration send notifications for other triggers I have configured. So, I know that part works. I assume there’s an error with my trigger section, but I don’t know what I am doing wrong.

Posts: 9

Participants: 5

Read full topic

I need Help with Shelly 2.5 integration

$
0
0

@bernadvd wrote:

Hey guys i need help

I am trying to integrate a Shelly 2.5 as a roller with HA and I have configured the sensor description, the rest_command and finally the cover, as follows:

sensor:
- platform: rest
** name: “my_cover_position”**
** scan_interval: 5**
** resource: http://192.168.0.18/roller/0**
** value_template: ‘{{ value_json.current_pos }}’**
** unit_of_measurement: “%”**
** headers:**
** content-type: application/x-www-form-urlencoded**

rest_command:
# Call cover action
shelly_cover_action:
** url: http://{{ip}}/roller/0**
** method: POST**
** headers:**
** accept: ‘application/json, text/html’**
** payload: ‘go={{action}}’**
** content_type: ‘application/x-www-form-urlencoded’**
** verify_ssl: true**
# Set cover position
shelly_cover_set_position:
** url: http://{{ip}}/roller/0**
** method: POST**
** headers:**
** accept: ‘application/json, text/html’**
** payload: ‘go=to_pos&roller_pos={{position}}’**
** content_type: ‘application/x-www-form-urlencoded’**
** verify_ssl: true**

cover:
- platform: template
** covers:**
** my_cover:**
** position_template: “{{ states(‘sensor.my_cover_position’) | float }}”**
** open_cover:**
** service: rest_command.shelly_cover_action**
** data:**
** ip: 192.168.0.18**
** action: open**

but when I save the configuration I get the following error

## Detalles de registro (ERROR)

Sun Feb 09 2020 23:57:53 GMT+0100 (hora estándar de Europa central)

Component error: shelly_cover_action - Integration ‘shelly_cover_action’ not found. Component error: shelly_cover_set_position - Integration ‘shelly_cover_set_position’ not found.

I don’t know what I’m doing wrong, can someone please help me?

Posts: 2

Participants: 2

Read full topic

Need some assistance on my lua script-> python for lutron

$
0
0

@ipaq62 wrote:

My script will turn on certain lights on my old lutron setup. Taken from my Vera installation. I don’t think I can use that in HA? I think I need to convert it to python. My try below the LUA :slight_smile: Any hints is appreciated.

local socket = require “socket”
local lutron_tcp

function connectLutron()
lutron_tcp = assert(socket.tcp())
lutron_tcp:settimeout(0.5)
lutron_tcp:connect(“192.168.0.50”, 23)
end

function sendLutron(cmd)
lutron_tcp:send(cmd … “\r”)
sleepLutron()
end

function disconnectLutron()
lutron_tcp:close()
end

function sleepLutron()
luup.sleep(500)
end

function powerOnLutron()
sendLutron(“password”)
sleepLutron()
end

connectLutron()
powerOnLutron()
sendLutron("#DEVICE,0x000b0eb9,141,7,0")
sendLutron("#DEVICE,0x000b11a7,141,7,0")
disconnectLutron()

My try on Python:
import telnetlib
HOST = 192.168.0.50"
password = “nwk”
tn = telnetlib.Telnet(HOST, “23”)
tn.read_until(“login: “)
tn.write(password + “\n”)
tn.read_until(“connection established”)
tn.write(”#DEVICE,0x000b0eb9,141,7,0\n”)
tn.write("#DEVICE,0x000b11a7,141,7,0\n")
tn.write(“exit\n”)
tn.read_all()

Pretty sure the exit part don’t work. Will try to see if I can test this outside HA first.

Thanks in advance!

Posts: 1

Participants: 1

Read full topic

IP Camera intermittent - logs? debug?

$
0
0

@Linwood wrote:

I have six 4k POE IP Cameras, five Lorex and one Hikvision.

I have them defined identically (except a different URI for hikvision).

I have all six in Lovelace in a tab in three vertical-stacks of picture-entity. I also periodically tell google to stream them onto a cast device.

Most of the time they work fine. Once in a while they go a bit nuts, for example twice today the lovelace display had two (the same two each time) missing every other refresh – exactly the same two, exactly every other refresh was a grey rectangle. Refresh and it worked fine.

Or when asking google to stream, often it just gets stuck and doesn’t shot up. Ask again and it works fine.

Clicking a picture item to show video works fine. So far have not noticed that missing.

Anyway… when things go wrong then… what?

The log generally gives no message, at least with defaults. Are there specific log configs you can use to get more data? If I knew what kind of error was occurring I might learn more.

I use a VMS system (Luxriot) and it is perfect, it never seems to have gaps. In manually pulling stills or streams to a browser it never misses. I am not saying they do not have any problems, just that I can’t figure out how to tell what the problems are.

BTW, I’m running HA on a VM which is on a desktop computer with plenty of spare horsepower. I don’t think it relates to computer or memory resources, at least not in the hypervisor.

So… if there are problems with a camera, where do you look? Or how can you turn on logs specific to it?

Posts: 2

Participants: 1

Read full topic

Conbee2 with deconz loose the network after a restart

$
0
0

@nebbiadigiorno wrote:

hi guys! i have hassio in a Vm with a conbee2 installed and deconZ. After every restart of the vm i loose my zigbee network. does anyone have the same problem? i found a report on github with this problem but no solution at all.

Thanks for the support.

Posts: 1

Participants: 1

Read full topic

Samsung SmartThings Air Condition

$
0
0

@Jacek_Paszkowski wrote:

Hi,

anybody use official SmartThings integration with Samsung AC (Air Condition) device?
I’m going to buy AC device i ned to know which is working with HA.

Which models are compatible? What device info is availabe inside HA and which HA services are working? :slight_smile:

Some compared with LG devices?

Thanks,
Jacek

Posts: 1

Participants: 1

Read full topic


.105.1: Deleted Entities in config.yaml are not disappearing from my developer states page

$
0
0

@scstraus wrote:

Hi,

I’m using YAML mode, and always could count on that if I deleted something from my configuration, it would disappear in the front end too… That appears to have changed. I am deleting automations and entities from my configuration, but they are staying in my configuration with the message

“This entity is currently unavailable and is an orphan to a removed, changed or dysfunctional integration or device.If the entity is no longer in use, you can clean it up by removing it”

Then I have to go into the UI and find all of these entities (which is hard because there’s nothing to indicate they are actually deleted ones) and delete them from the UI.

This seems really stupid to me, is there any way I can turn off this behavior so I don’t end up with years and years of deleted stuff cluttering up my developer states UI?

Posts: 6

Participants: 3

Read full topic

Is this possible, and which custom-card (combination) is needed

$
0
0

@Mariusthvdb wrote:

trying to create a card with set of multiple-entity-row 's I a trying to pass along a templated entity_id from the main switch, and template the power sensors as primary and secondary info per line. as I created a config with a decluttering card, (with which we can not template as such) I need a config per line for each switch/sensors combination.

Would love to explore the possibility for templating though, and maybe this is possible with the Lovelace_gen? Or card_templater.

this is what it would ideally look like:

type: custom:auto-entities
card:
  type: entities
  title: Multiple entities
  show_header_toggle: false
filter:
  include:
    - entity_id: switch.sw*_template
      options:
        type: custom:multiple-entity-row
        state_color: true
        toggle: true
        secondary_info: last-changed
          primary:
            entity: sensor.{{entity.entity_id[10:-9]}}_actueel
            name: Actueel
            unit: Watt
          secondary:
            entity: sensor.{{entity.entity_id[10:-9]}}_totaal
            name: Totaal
            unit: kWh
          sort:
            method: name

hope this is self explanatory, and of course it doesn’t work, but it shows what I need.

loooking like this:

made with decluttering:

card:
  type: custom:multiple-entity-row
  entity: switch.sw_[[entity]]_template
  state_color: true
  toggle: true
  secondary_info: last-changed
  primary:
    entity: sensor.[[entity]]_actueel
    name: Actueel
    unit: Watt
  secondary:
    entity: sensor.[[entity]]_totaal
    name: Totaal
    unit: kWh

and card config:

type: entities
title: Switches multiple entity
show_header_toggle: false
entities:
  - type: custom:decluttering-card
    template: switches_multiple_entity
    variables:
      - entity: 'espresso_keuken'

  - type: custom:decluttering-card
    template: switches_multiple_entity
    variables:
      - entity: 'multi_purpose'

  - type: custom:decluttering-card
    template: switches_multiple_entity
    variables:
      - entity: 'vaatwasser_keuken'

the switches all have the entity_id’s like:

switch.sw_boiler_bijkeuken_template

and the sensors:

sensor.boiler_bijkeuken_state
sensor.boiler_bijkeuken_totaal

would you please have a look if I can realize this, in 1 config with custom-cards?

thanks!

Posts: 1

Participants: 1

Read full topic

Handling a string from json file

$
0
0

@bnetse wrote:

I am using the file platform to get information from a json file that is a scrape of my weatherstation.

The file looks like this:


`{"outHumi": "98", "RelPress": "1013.40", "uvi": "2", "avgwind": "0.0", "rainofyearly": "741.90", "windir": "258", "IndoorID": "0x--", "eventrain": "5.30", "solarrad": "143.75", "inTemp": "21.1", "Outdoor2ID": "0x--", "inHumi": "82", "pm25": "----", "rainofmonthly": "618.00", "rainofdaily": "0.00", "dailygust": "1.0", "Outdoor1ID": "0x61", "rainofweekly": "26.60", "AbsPress": "936.50", "rainofhourly": "0.00", "uv": "701", "outTemp": "20.4", "outBattSta2": "- -", "outBattSta1": "Normal", "inBattSta": "Normal", "gustspeed": "0.0"}`

My configuration is:

 - platform: file
     name: 'Outdoor Battery'
     file_path: /home/homeassistant/weatherStationData.json
     value_template: '{{ value_json.outBattSta }}'

to get the battery status which is currently “Normal”

In home Assistant I get something for this sensor, but not the “Normal” bit

Any ideas? Im sure its pretty simple, I just can’t find the missing bit.

Thanks
Ben

Posts: 5

Participants: 3

Read full topic

PSA: When testing trigger templates, use namespace

$
0
0

@petro wrote:

I don’t often use the template editor to create my own automations because I’ve been using appdaemon for years. Well today, I created my own automation because it seemed silly to create it in appdaemon app because it was very basic. Like all automations I create, I tried to make it as generic as possible. This means, anyone can use it or expand it with as few lines of yaml as possible. Typically when doing this we need templates, so that’s what I did.

This lead me to the realization that users don’t have a great way to test triggers in the template editor. So, without further delay, here are some ‘canned’ triggers that can be used when testing trigger templates in actions or conditions:

State Trigger

Equal from_state and to_state

Simply change the name of the entity_id and it will create a ‘fake’ trigger object. Keep in mind that from_state and to_state will always be equal.

{% set entity_id = 'sensor.xxx' %}
{% set fake_state = states | selectattr('entity_id','eq',entity_id) | first %}
{% set trigger = namespace(platform='state', entity_id=entity_id, from_state=fake_state, to_state=fake_state) %}

Emulates:

trigger:
- platform: state
  entity_id: sensor.xxx

Use examples:

{{ trigger.to_state.state }} # returns the state of sensor.xxx
{{ states(trigger.entity_id) }} # returns sensor.xxx

from_state and to_state are not equal

Simply change the name of the entity_id and it will create a ‘fake’ trigger object. Keep in mind that from_state and to_state will not be equal. Also, keep in mind that they are different entities. Try to use entities from the same domain to ‘simulate’ this properly.

{% set entity_id = 'sensor.xxx' %}
{% set entity_id2 = 'sensor.yyy' %}
{% set from_state = states | selectattr('entity_id','eq',entity_id) | first %}
{% set to_state = states | selectattr('entity_id','eq',entity_id2) | first %}
{% set trigger = namespace(platform='state', entity_id=entity_id, from_state=from_state, to_state=to_state) %}

Emulates:

trigger:
- platform: state
  entity_id: sensor.xxx

Use examples:

{{ trigger.from_state.state }} # returns the state of sensor.xxx
{{ trigger.to_state.state }} # returns the state of sensor.yyy
{{ trigger.from_state.state != trigger.to_state.state }} # returns sensor.xxx state does not equal sensor.yyy's state

With a for: minutes: 3 object.

Simply change the name of the entity_id and it will create a ‘fake’ trigger object. Keep in mind that from_state and to_state will always be equal.

{% set entity_id = 'sensor.xxx' %}
{% set entity_id2 = 'sensor.yyy' %}
{% set for_obj = namespace(minutes=3) %} #simply change minutes=3 to hours=1 for hours etc.
{% set from_state = states | selectattr('entity_id','eq',entity_id) | first %}
{% set to_state = states | selectattr('entity_id','eq',entity_id2) | first %}
{% set trigger = namespace(platform='state', entity_id=entity_id, from_state=from_state, to_state=to_state, for=for_obj) %}

Emulates:

trigger:
- platform: state
  entity_id: sensor.xxx
  for:
    minutes: 3

Use examples:

{{ trigger.for.minutes }} # returns 3

If this gets a lot of attention, I’ll gladly add more examples.

Posts: 4

Participants: 3

Read full topic

How to enable my disabled entity again (zIggoNet)

$
0
0

@Johan_Wijbenga wrote:

I installed the ZiggoNext integration using HACS, everything went well.
At one moment i decided to disable my ZiggoNext entity (configuration - entities).
At this moment i thougt that i simply could enable the entity again after disabling it… i was wrong, after disabling it it wasnt in the entities list anymore. I searched for an option to get it back, no succes.

What i’ve did using HACS:
uninstalling ZiggoNext integration.
restart HASS.
Install ZiggoNext integration.
restart HASS

But still i haven’t got my ZiggoNext entity back :frowning:

Posts: 1

Participants: 1

Read full topic

Configuration Check False Positive?

$
0
0

@Salty wrote:

I am running the latest version of HassOS 3.10, Supervisor 200, and Home Assistant Core 0.105.2 on a Raspberry pi. Everything is working fine, but when I performed a configuration check before upgrading, I received the following error:

Failed config
  homeassistant: 
    - not a directory @ data['whitelist_external_dirs'][0]
    - customize: [source /tmp/config/configuration.yaml:11]
        device_tracker.someones_iphone_2: [source /tmp/config/customize.yaml:91]
          entity_picture: /local/persons/someones_avatar_v1.png
        device_tracker.libbys_iphone: [source /tmp/config/customize.yaml:93]

and it continued to list all of the other entities defined in my customize.yaml file.

My configuration.yaml has these entries (among others):

homeassistant:
  customize: !include customize.yaml
  whitelist_external_dirs:
    - '/share'
default_config:

The whitelisting is for my blink driveway camera to write snapshots to a folder under share.

As far as I can tell, it’s properly configured, but does anyone see anything I am missing or doing incorrectly, or is this just a false positive? Thanks so much for any help with this.

Posts: 1

Participants: 1

Read full topic

Changed network configuration, now HA can’t connect to MySQL

$
0
0

@ksolomon wrote:

I just finished rewiring out house and redoing the network infrastructure (new router, switch, etc). As part of the rebuild, I changed the network config from class C addressing to class A. Prior to the rebuild, HA (hass.io in docker on an Acer USFF pc) worked with MySQL on an external server flawlessly. After switching everything, HA can no longer connect to the DB server. The only thing that changed was the IP of the MySQL server, all other DB details remained as they were. I’ve verified that the DB info in the HA config is pointed to the correct IP, but it just won’t link.

The relevant messages in the error log are as follows:

(MySQLdb._exceptions.OperationalError) (2002, “Can’t connect to MySQL server on ‘10.0.0.75’ (115)”)
(Background on this error at: http://sqlalche.me/e/e3q8) (retrying in 3 seconds)

Any ideas on what may be going on?

Posts: 3

Participants: 2

Read full topic


Http Config error

$
0
0

@tom-cyter wrote:

Hello, I dont know what to do. Im a new user of HassIO. I want to get remote access via DuckDns. Ive installed the add-on and configured it like .

lets_encrypt:
accept_terms: true
certfile: fullchain.pem
keyfile: privkey.pem
token: my_token
domains: - example.duckdns.org
seconds: 300

I also added the http configuration in the Configuration.yaml like this:

http:
base_url: example.duckdns.org:8123
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem

And i this error:

Invalid config for [http]: not a file for dictionary value @ data[‘http’][‘ssl_certificate’]. Got ‘/ssl/fullchain.pem’
not a file for dictionary value @ data[‘http’][‘ssl_key’]. Got ‘/ssl/privkey.pem’. (See /config/configuration.yaml, line 6).

Have somone solved the problem?
Please Help me!

Posts: 1

Participants: 1

Read full topic

Error logged when I enter the Integrations page

$
0
0

@SylvainGa wrote:

Hi, whenever I go into the Integrations page, I get the following error twice in a row in home-assistant.log. It’s all in one line with %dd replacing the non alphabet/digit characters as such:


2020-02-10 19:34:42 ERROR (MainThread) [frontend.js.latest.202001301] data:text/javascript;charset=utf-8,%2F*!%20For%20license%20information%20please%20see%20scripts.js.LICENSE%20*%2F%0A!function....

But I exploded it to make it easier to see and hopefully someone can/will pinpoint the problem:

2020-02-10 19:34:42 ERROR (MainThread) [frontend.js.latest.202001301] data:text/javascript;charset=utf-8,/*! For license information please see scripts.js.LICENSE */
!function(t){var e={};function s(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=t,s.c=e,s.d=function(t,e,i){s.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},s.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s(s.s=0)}([function(t,e,s){"use strict";function i(t,e,s,i=!1){t._themes||(t._themes={});let n=e.default_theme;("default"===s||s&&e.themes[s])&&(n=s);const a={...t._themes};if("default"!==n){const s=e.themes[n];Object.keys(s).forEach(e=>{const i="--"+e;t._themes[i]="",a[i]=s[e]})}if(t.updateStyles?t.updateStyles(a):window.ShadyCSS&&window.ShadyCSS.styleSubtree(t,a),!i)return;const o=document.querySelector("meta[name=theme-color]");if(o){o.hasAttribute("default-content")||o.setAttribute("default-content",o.getAttribute("content"));const t=a["--primary-color"]||o.getAttribute("default-content");o.setAttribute("content",t)}}function n(t){return t.substr(0,t.indexOf("."))}function a(t){return n(t.entity_id)}function o(t,e,s){const i=t;let n;i.lastChild&&i.lastChild.tagName===e?n=i.lastChild:(i.lastChild&&i.removeChild(i.lastChild),n=document.createElement(e.toLowerCase())),n.setProperties?n.setProperties(s):Object.keys(s).forEach(t=>{n[t]=s[t]}),null===n.parentNode&&i.appendChild(n)}s.r(e);const r=(t,e)=>0!=(t.attributes.supported_features&e),l=["climate","cover","configurator","input_select","input_number","input_text","lock","media_player","scene","script","timer","vacuum","water_heater","weblink"];new Set(["fan","input_boolean","light","switch","group","automation"]);const c=new WeakMap,d=t=>"function"==typeof t&&c.has(t),u=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,h=(t,e,s=null)=>{let i=e;for(;i!==s;){const e=i.nextSibling;t.removeChild(i),i=e}},p={},m={},g=`{{lit-${String(Math.random()).slice(2)}}}`,y=`\x3c!--${g}--\x3e`,b=new RegExp(`${g}|${y}`),_="$lit$";class f{constructor(t,e){this.parts=[],this.element=e;let s=-1,i=0;const n=[],a=e=>{const o=e.content,r=document.createTreeWalker(o,133,null,!1);let l=0;for(;r.nextNode();){s++;const e=r.currentNode;if(1===e.nodeType){if(e.hasAttributes()){const n=e.attributes;let a=0;for(let t=0;t<n.length;t++)n[t].value.indexOf(g)>=0&&a++;for(;a-- >0;){const n=t.strings[i],a=S.exec(n)[2],o=a.toLowerCase()+_,r=e.getAttribute(o).split(b);this.parts.push({type:"attribute",index:s,name:a,strings:r}),e.removeAttribute(o),i+=r.length-1}}"TEMPLATE"===e.tagName&&a(e)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(g)>=0){const a=e.parentNode,o=t.split(b),r=o.length-1;for(let t=0;t<r;t++)a.insertBefore(""===o[t]?v():document.createTextNode(o[t]),e),this.parts.push({type:"node",index:++s});""===o[r]?(a.insertBefore(v(),e),n.push(e)):e.data=o[r],i+=r}}else if(8===e.nodeType)if(e.data===g){const t=e.parentNode;null!==e.previousSibling&&s!==l||(s++,t.insertBefore(v(),e)),l=s,this.parts.push({type:"node",index:s}),null===e.nextSibling?e.data="":(n.push(e),s--),i++}else{let t=-1;for(;-1!==(t=e.data.indexOf(g,t+1));)this.parts.push({type:"node",index:-1})}}};a(e);for(const t of n)t.parentNode.removeChild(t)}}const w=t=>-1!==t.index,v=()=>document.createComment(""),S=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F \x09\x0a\x0c\x0d"'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;class C{constructor(t,e,s){this._parts=[],this.template=t,this.processor=e,this.options=s}update(t){let e=0;for(const s of this._parts)void 0!==s&&s.setValue(t[e]),e++;for(const t of this._parts)void 0!==t&&t.commit()}_clone(){const t=u?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=this.template.parts;let s=0,i=0;const n=t=>{const a=document.createTreeWalker(t,133,null,!1);let o=a.nextNode();for(;s<e.length&&null!==o;){const t=e[s];if(w(t))if(i===t.index){if("node"===t.type){const t=this.processor.handleTextExpression(this.options);t.insertAfterNode(o.previousSibling),this._parts.push(t)}else this._parts.push(...this.processor.handleAttributeExpressions(o,t.name,t.strings,this.options));s++}else i++,"TEMPLATE"===o.nodeName&&n(o.content),o=a.nextNode();else this._parts.push(void 0),s++}};return n(t),u&&(document.adoptNode(t),customElements.upgrade(t)),t}}class x{constructor(t,e,s,i){this.strings=t,this.values=e,this.type=s,this.processor=i}getHTML(){const t=this.strings.length-1;let e="";for(let s=0;s<t;s++){const t=this.strings[s],i=S.exec(t);e+=i?t.substr(0,i.index)+i[1]+i[2]+_+i[3]+g:t+y}return e+this.strings[t]}getTemplateElement(){const t=document.createElement("template");return t.innerHTML=this.getHTML(),t}}const E=t=>null===t||!("object"==typeof t||"function"==typeof t);class O{constructor(t,e,s){this.dirty=!0,this.element=t,this.name=e,this.strings=s,this.parts=[];for(let t=0;t<s.length-1;t++)this.parts[t]=this._createPart()}_createPart(){return new T(this)}_getValue(){const t=this.strings,e=t.length-1;let s="";for(let i=0;i<e;i++){s+=t[i];const e=this.parts[i];if(void 0!==e){const t=e.value;if(null!=t&&(Array.isArray(t)||"string"!=typeof t&&t[Symbol.iterator]))for(const e of t)s+="string"==typeof e?e:String(e);else s+="string"==typeof t?t:String(t)}}return s+t[e]}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class T{constructor(t){this.value=void 0,this.committer=t}setValue(t){t===p||E(t)&&t===this.value||(this.value=t,d(t)||(this.committer.dirty=!0))}commit(){for(;d(this.value);){const t=this.value;this.value=p,t(this)}this.value!==p&&this.committer.commit()}}class A{constructor(t){this.value=void 0,this._pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(v()),this.endNode=t.appendChild(v())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t._insert(this.startNode=v()),t._insert(this.endNode=v())}insertAfterPart(t){t._insert(this.startNode=v()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this._pendingValue=t}commit(){for(;d(this._pendingValue);){const t=this._pendingValue;this._pendingValue=p,t(this)}const t=this._pendingValue;t!==p&&(E(t)?t!==this.value&&this._commitText(t):t instanceof x?this._commitTemplateResult(t):t instanceof Node?this._commitNode(t):Array.isArray(t)||t[Symbol.iterator]?this._commitIterable(t):t===m?(this.value=m,this.clear()):this._commitText(t))}_insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}_commitNode(t){this.value!==t&&(this.clear(),this._insert(t),this.value=t)}_commitText(t){const e=this.startNode.nextSibling;t=null==t?"":t,e===this.endNode.previousSibling&&3===e.nodeType?e.data=t:this._commitNode(document.createTextNode("string"==typeof t?t:String(t))),this.value=t}_commitTemplateResult(t){const e=this.options.templateFactory(t);if(this.value instanceof C&&this.value.template===e)this.value.update(t.values);else{const s=new C(e,t.processor,this.options),i=s._clone();s.update(t.values),this._commitNode(i),this.value=s}}_commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const e=this.value;let s,i=0;for(const n of t)void 0===(s=e[i])&&(s=new A(this.options),e.push(s),0===i?s.appendIntoPart(this):s.insertAfterPart(e[i-1])),s.setValue(n),s.commit(),i++;i<e.length&&(e.length=i,this.clear(s&&s.endNode))}clear(t=this.startNode){h(this.startNode.parentNode,t.nextSibling,this.endNode)}}class I extends T{}let U=!1;try{const t={get capture(){return U=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}const N=t=>t&&(U?{capture:t.capture,passive:t.passive,once:t.once}:t.capture),k=new class{handleAttributeExpressions(t,e,s,i){const n=e[0];return"."===n?new class extends O{constructor(t,e,s){super(t,e,s),this.single=2===s.length&&""===s[0]&&""===s[1]}_createPart(){return new I(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}(t,e.slice(1),s).parts:"@"===n?[new class{constructor(t,e,s){this.value=void 0,this._pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=s,this._boundHandleEvent=(t=>this.handleEvent(t))}setValue(t){this._pendingValue=t}commit(){for(;d(this._pendingValue);){const t=this._pendingValue;this._pendingValue=p,t(this)}if(this._pendingValue===p)return;const t=this._pendingValue,e=this.value,s=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),i=null!=t&&(null==e||s);s&&this.element.removeEventListener(this.eventName,this._boundHandleEvent,this._options),i&&(this._options=N(t),this.element.addEventListener(this.eventName,this._boundHandleEvent,this._options)),this.value=t,this._pendingValue=p}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}(t,e.slice(1),i.eventContext)]:"?"===n?[new class{constructor(t,e,s){if(this.value=void 0,this._pendingValue=void 0,2!==s.length||""!==s[0]||""!==s[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=s}setValue(t){this._pendingValue=t}commit(){for(;d(this._pendingValue);){const t=this._pendingValue;this._pendingValue=p,t(this)}if(this._pendingValue===p)return;const t=!!this._pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)),this.value=t,this._pendingValue=p}}(t,e.slice(1),s)]:new O(t,e,s).parts}handleTextExpression(t){return new A(t)}};function P(t){let e=j.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},j.set(t.type,e));let s=e.stringsArray.get(t.strings);if(void 0!==s)return s;const i=t.strings.join(g);return void 0===(s=e.keyString.get(i))&&(s=new f(t,t.getTemplateElement()),e.keyString.set(i,s)),e.stringsArray.set(t.strings,s),s}const j=new Map,D=new WeakMap;(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.0.0");const L=(t,...e)=>new x(t,e,"html",k),M=133;function R(t,e){const{element:{content:s},parts:i}=t,n=document.createTreeWalker(s,M,null,!1);let a=V(i),o=i[a],r=-1,l=0;const c=[];let d=null;for(;n.nextNode();){r++;const t=n.currentNode;for(t.previousSibling===d&&(d=null),e.has(t)&&(c.push(t),null===d&&(d=t)),null!==d&&l++;void 0!==o&&o.index===r;)o.index=null!==d?-1:o.index-l,o=i[a=V(i,a)]}c.forEach(t=>t.parentNode.removeChild(t))}const B=t=>{let e=11===t.nodeType?0:1;const s=document.createTreeWalker(t,M,null,!1);for(;s.nextNode();)e++;return e},V=(t,e=-1)=>{for(let s=e+1;s<t.length;s++){const e=t[s];if(w(e))return s}return-1},H=(t,e)=>`${t}--${e}`;let z=!0;void 0===window.ShadyCSS?z=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected.Please update to at least @webcomponents/webcomponentsjs@2.0.2 and@webcomponents/shadycss@1.3.1."),z=!1);const W=["html","svg"],F=new Set;window.JSCompiler_renameProperty=((t,e)=>t);const $={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){switch(e){case Boolean:return null!==t;case Number:return null===t?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},q=(t,e)=>e!==t&&(e==e||t==t),G={attribute:!0,type:String,converter:$,reflect:!1,hasChanged:q},J=Promise.resolve(!0),K=1,Y=4,Q=8,X=16,Z=32;class tt extends HTMLElement{constructor(){super(),this._updateState=0,this._instanceProperties=void 0,this._updatePromise=J,this._hasConnectedResolver=void 0,this._changedProperties=new Map,this._reflectingProperties=void 0,this.initialize()}static get observedAttributes(){this.finalize();const t=[];return this._classProperties.forEach((e,s)=>{const i=this._attributeNameForProperty(s,e);void 0!==i&&(this._attributeToPropertyMap.set(i,s),t.push(i))}),t}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const t=Object.getPrototypeOf(this)._classProperties;void 0!==t&&t.forEach((t,e)=>this._classProperties.set(e,t))}}static createProperty(t,e=G){if(this._ensureClassProperties(),this._classProperties.set(t,e),e.noAccessor||this.prototype.hasOwnProperty(t))return;const s="symbol"==typeof t?Symbol():`__${t}`;Object.defineProperty(this.prototype,t,{get(){return this[s]},set(e){const i=this[t];this[s]=e,this._requestUpdate(t,i)},configurable:!0,enumerable:!0})}static finalize(){if(this.hasOwnProperty(JSCompiler_renameProperty("finalized",this))&&this.finalized)return;const t=Object.getPrototypeOf(this);if("function"==typeof t.finalize&&t.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const t=this.properties,e=[...Object.getOwnPropertyNames(t),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]];for(const s of e)this.createProperty(s,t[s])}}static _attributeNameForProperty(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}static _valueHasChanged(t,e,s=q){return s(t,e)}static _propertyValueFromAttribute(t,e){const s=e.type,i=e.converter||$,n="function"==typeof i?i:i.fromAttribute;return n?n(t,s):t}static _propertyValueToAttribute(t,e){if(void 0===e.reflect)return;const s=e.type,i=e.converter;return(i&&i.toAttribute||$.toAttribute)(t,s)}initialize(){this._saveInstanceProperties(),this._requestUpdate()}_saveInstanceProperties(){this.constructor._classProperties.forEach((t,e)=>{if(this.hasOwnProperty(e)){const t=this[e];delete this[e],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(e,t)}})}_applyInstanceProperties(){this._instanceProperties.forEach((t,e)=>this[e]=t),this._instanceProperties=void 0}connectedCallback(){this._updateState=this._updateState|Z,this._hasConnectedResolver&&(this._hasConnectedResolver(),this._hasConnectedResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(t,e,s){e!==s&&this._attributeToProperty(t,s)}_propertyToAttribute(t,e,s=G){const i=this.constructor,n=i._attributeNameForProperty(t,s);if(void 0!==n){const t=i._propertyValueToAttribute(e,s);if(void 0===t)return;this._updateState=this._updateState|Q,null==t?this.removeAttribute(n):this.setAttribute(n,t),this._updateState=this._updateState&~Q}}_attributeToProperty(t,e){if(this._updateState&Q)return;const s=this.constructor,i=s._attributeToPropertyMap.get(t);if(void 0!==i){const t=s._classProperties.get(i)||G;this._updateState=this._updateState|X,this[i]=s._propertyValueFromAttribute(e,t),this._updateState=this._updateState&~X}}_requestUpdate(t,e){let s=!0;if(void 0!==t){const i=this.constructor,n=i._classProperties.get(t)||G;i._valueHasChanged(this[t],e,n.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,e),!0!==n.reflect||this._updateState&X||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,n))):s=!1}!this._hasRequestedUpdate&&s&&this._enqueueUpdate()}requestUpdate(t,e){return this._requestUpdate(t,e),this.updateComplete}async _enqueueUpdate(){let t,e;this._updateState=this._updateState|Y;const s=this._updatePromise;this._updatePromise=new Promise((s,i)=>{t=s,e=i});try{await s}catch(t){}this._hasConnected||await new Promise(t=>this._hasConnectedResolver=t);try{const t=this.performUpdate();null!=t&&await t}catch(t){e(t)}t(!this._hasRequestedUpdate)}get _hasConnected(){return this._updateState&Z}get _hasRequestedUpdate(){return this._updateState&Y}get hasUpdated(){return this._updateState&K}performUpdate(){this._instanceProperties&&this._applyInstanceProperties();let t=!1;const e=this._changedProperties;try{(t=this.shouldUpdate(e))&&this.update(e)}catch(e){throw t=!1,e}finally{this._markUpdated()}t&&(this._updateState&K||(this._updateState=this._updateState|K,this.firstUpdated(e)),this.updated(e))}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~Y}get updateComplete(){return this._updatePromise}shouldUpdate(t){return!0}update(t){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((t,e)=>this._propertyToAttribute(e,this[e],t)),this._reflectingProperties=void 0)}updated(t){}firstUpdated(t){}}tt.finalized=!0;const et="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;Symbol(),(window.litElementVersions||(window.litElementVersions=[])).push("2.0.1");const st=t=>t.flat?t.flat(1/0):function t(e,s=[]){for(let i=0,n=e.length;i<n;i++){const n=e[i];Array.isArray(n)?t(n,s):s.push(n)}return s}(t);class it extends tt{static finalize(){super.finalize(),this._styles=this.hasOwnProperty(JSCompiler_renameProperty("styles",this))?this._getUniqueStyles():this._styles||[]}static _getUniqueStyles(){const t=this.styles,e=[];return Array.isArray(t)?st(t).reduceRight((t,e)=>(t.add(e),t),new Set).forEach(t=>e.unshift(t)):t&&e.push(t),e}initialize(){super.initialize(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?et?this.renderRoot.adoptedStyleSheets=t.map(t=>t.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(t=>t.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){super.update(t);const e=this.render();e instanceof x&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)}))}render(){}}it.finalized=!0,it.render=((t,e,s)=>{const i=s.scopeName,n=D.has(e),a=e instanceof ShadowRoot&&z&&t instanceof x,o=a&&!F.has(i),r=o?document.createDocumentFragment():e;if(((t,e,s)=>{let i=D.get(e);void 0===i&&(h(e,e.firstChild),D.set(e,i=new A(Object.assign({templateFactory:P},s))),i.appendInto(e)),i.setValue(t),i.commit()})(t,r,Object.assign({templateFactory:(t=>e=>{const s=H(e.type,t);let i=j.get(s);void 0===i&&(i={stringsArray:new WeakMap,keyString:new Map},j.set(s,i));let n=i.stringsArray.get(e.strings);if(void 0!==n)return n;const a=e.strings.join(g);if(void 0===(n=i.keyString.get(a))){const s=e.getTemplateElement();z&&window.ShadyCSS.prepareTemplateDom(s,t),n=new f(e,s),i.keyString.set(a,n)}return i.stringsArray.set(e.strings,n),n})(i)},s)),o){const t=D.get(r);D.delete(r),t.value instanceof C&&((t,e,s)=>{F.add(s);const i=t.querySelectorAll("style");if(0===i.length)return void window.ShadyCSS.prepareTemplateStyles(e.element,s);const n=document.createElement("style");for(let t=0;t<i.length;t++){const e=i[t];e.parentNode.removeChild(e),n.textContent+=e.textContent}if(s=s,W.forEach(t=>{const e=j.get(H(t,s));void 0!==e&&e.keyString.forEach(t=>{const{element:{content:e}}=t,s=new Set;Array.from(e.querySelectorAll("style")).forEach(t=>{s.add(t)}),R(t,s)})}),function(t,e,s=null){const{element:{content:i},parts:n}=t;if(null===s||void 0===s)return void i.appendChild(e);const a=document.createTreeWalker(i,M,null,!1);let o=V(n),r=0,l=-1;for(;a.nextNode();)for(l++,a.currentNode===s&&(r=B(e),s.parentNode.insertBefore(e,s));-1!==o&&n[o].index===l;){if(r>0){for(;-1!==o;)n[o].index+=r,o=V(n,o);return}o=V(n,o)}}(e,n,e.element.content.firstChild),window.ShadyCSS.prepareTemplateStyles(e.element,s),window.ShadyCSS.nativeShadow){const s=e.element.content.querySelector("style");t.insertBefore(s.cloneNode(!0),t.firstChild)}else{e.element.content.insertBefore(n,e.element.content.first:
:
:
:  **** HAD TO CUT PART OF IT BECAUSE BODY IS LIMITED TO 32767 CHARACTERS ****
:
:

      <div id='container' class='horizontal layout justified'>
        <state-info
            hass='[[hass]]'
            class='state-info'
            state-obj='[[stateObj]]'
            in-dialog='[[showLastChanged(stateObj, inDialog, extra)]]'
            secondary-line$='[[hasExtra(extra)]]'>
          <template is='dom-repeat' items='[[extra]]'>
            <div>[[item]]</div>
          </template>
        </state-info>
        <dynamic-with-extra
            hass='[[hass]]'
            state-obj='[[stateObj]]'
            control-element='[[controlElement]]'
            in-dialog='[[inDialog]]'>
        </dynamic-with-extra>
      </div>
      `}})}function gt(){const t=["configurator"],e={light:1,cover:4,climate:1},s={toggle:"ha-entity-toggle",display:"",cover:"ha-cover-controls"};customElements.define("state-card-custom-ui",class extends Polymer.Element{static get properties(){return{hass:Object,inDialog:{type:Boolean,value:!1},stateObj:Object}}static get observers(){return["inputChanged(hass, inDialog, stateObj)"]}connectedCallback(){super.connectedCallback();const t=this.parentNode.parentNode;"DIV"===t.tagName&&(t.classList.contains("state")||t.classList.contains("child-card"))&&(this._container=t,t.style.setProperty("background-color","var(--paper-card-background-color, inherit)"),t.updateStyles||(t.updateStyles=(e=>{Object.keys(e).forEach(s=>{t.style.setProperty(s,e[s])})}))),this._isAttached=!0,this.inputChanged(this.hass,this.inDialog,this.stateObj)}disconnectedCallback(){this._isAttached=!1,this._container&&(this._container.updateStyles({display:"",margin:"",padding:""}),i(this._container,this.hass.themes||{default_theme:"default",themes:{}},"default"),this._container=null),super.disconnectedCallback()}badgeMode(t,e,s){const i=[];if("group"===s)e.attributes.entity_id.forEach(s=>{const n=t.states[s];n?e.attributes.badges_list&&!e.attributes.badges_list.includes(n.entity_id)||i.push(window.customUI.maybeChangeObject(this,n,!1,!1)):console.warn(`Unknown ID ${s} in group ${e.entity_id}`)});else if(i.push(e),this._container){this._container.style.display="inline-block";const t={display:"inline-block"};this._container.classList.contains("state")&&(t.margin="var(--ha-badges-card-margin, 0)"),this.updateStyles(t)}o(this,"HA-BADGES-CARD",{hass:t,states:i}),this._container&&this._container.updateStyles({width:"var(--ha-badges-card-width, initial)","text-align":"var(--ha-badges-card-text-align, initial)"}),this.lastChild.style.fontSize="85%",this.style.setProperty("--ha-state-label-badge-margin-bottom","0")}cleanBadgeStyle(){this._container&&this._container.updateStyles({display:"",width:"","text-align":""}),this.updateStyles({display:"",margin:""})}applyThemes(t,e){let s=this,n="default";this._container&&(s=this._container),e.attributes.theme&&(n=e.attributes.theme),i(s,t.themes||{default_theme:"default",themes:{}},n)}maybeHideEntity(t){return t?(this._container&&this._container.updateStyles({margin:"",padding:""}),!1):(this.lastChild&&this.removeChild(this.lastChild),this._container&&this._container.updateStyles({margin:"0",padding:"0"}),!0)}sliderEligible_(t,s,i){return!i&&e[t]&&e[t]&s.attributes.supported_features&&s.attributes.state_card_mode&&"no-slider"!==s.attributes.state_card_mode}inputChanged(t,e,s){if(!s||!t||!this._isAttached)return;const i=a(s),n=window.customUI.maybeChangeObject(this,s,e,!0);this.maybeHideEntity(n)||(this.applyThemes(t,n),e||"badges"!==n.attributes.state_card_mode?this.regularMode_(t,e,n,i):this.badgeMode(t,n,i))}regularMode_(e,i,n,c){this.cleanBadgeStyle();const d={hass:e,stateObj:n,inDialog:i},u=function(t,e){if("unavailable"===e.state)return"display";const s=a(e);return l.includes(s)?s:function(t,e){const s=a(e);return"group"===s?"on"===e.state||"off"===e.state:"climate"===s?r(e,4096):function(t,e){const s=t.services[e];return!!s&&("lock"===e?"lock"in s:"cover"===e?"open_cover"in s:"turn_on"in s)}(t,s)}(t,e)&&"hidden"!==e.attributes.control?"toggle":"display"}(e,n);let h;const p=n.attributes.state_card_custom_ui_secondary;"light"===c&&this.sliderEligible_(c,n,i)?(Object.assign(d,{controlElement:"ha-entity-toggle",serviceMin:"turn_off",serviceMax:"turn_on",valueName:"brightness",domain:c}),h="state-card-with-slider"):"cover"===c&&this.sliderEligible_(c,n,i)?(Object.assign(d,{controlElement:"ha-cover-controls",max:100,serviceMin:"close_cover",serviceMax:"set_cover_position",setValueName:"position",valueName:"current_position",nameOn:"open",domain:c}),h="state-card-with-slider"):"climate"===c&&this.sliderEligible_(c,n,i)?(Object.assign(d,{controlElement:"ha-climate-state",min:n.attributes.min_temp||-100,max:n.attributes.max_temp||200,serviceMin:"set_temperature",serviceMax:"set_temperature",valueName:"temperature",nameOn:"",domain:c}),h="state-card-with-slider"):void 0!==s[u]?(d.controlElement=s[u],h="state-card-without-slider"):n.attributes.show_last_changed&&!t.includes(u)&&(d.inDialog=!0),"unavailable"===n.state&&(d.controlElement=""),void 0!==n.attributes.control_element&&(d.controlElement=n.attributes.control_element),o(this,(p||h||`STATE-CARD-${u}`).toUpperCase(),d)}})}Polymer&&Polymer.Element&&customElements.get("home-assistant")?ut():customElements.whenDefined("home-assistant").then(()=>ut()),customElements.whenDefined("state-card-display").then(()=>{customElements.define("dynamic-with-extra",class extends(customElements.get("state-card-display")){static get template(){return ct`
      <style is="custom-style" include="iron-flex iron-flex-alignment iron-flex-factors"></style>
      <style>
        :host {
          display: inline-block;
        }
        .control-wrapper {
          margin: -4px -16px -4px 0;
          padding: 4px 16px;
        }
        ha-state-label-badge {
          margin-left: 8px;
        }
        dynamic-element {
          display: block;
          text-align: right;
        }
        #overlay {
          position: absolute;
          left: 0;
          right: 0;
          top: 0;
          bottom: 0;
          text-align: right;
          z-index: 1;
        }
        #lock {
          margin-top: 8px;
          opacity: 0.3;
          margin-right: 7px;
        }
        #lock.ha-cover-controls {
          margin-right: 52px;
          background-color: white;
        }
        .extra {
          margin-bottom: -16px;
          --ha-label-badge-size: 36px;
          --ha-label-badge-font-size: 1.2em;
        }
        .state {
          @apply --paper-font-body1;
          color: var(--primary-text-color);
          margin-left: 16px;
          text-align: right;
          line-height: 40px;
        }
      </style>
      <div class$='[[extraClass(extraObjVisible)]] horizontal layout'>
        <template is='dom-if' if='[[extraObjVisible]]'>
          <template is='dom-repeat'
                    items='[[extraObj]]'
                    on-dom-change='extraDomChanged'>
            <ha-state-label-badge hass='[[hass]]' state='[[item]]'></ha-state-label-badge>
          </template>
        </template>
        <template is='dom-if' if='[[_showControl(inDialog, stateObj)]]'>
          <template is='dom-if' if='[[controlElement]]'>
            <div class="control-wrapper">
              <dynamic-element
                  class='flex'
                  state-obj="[[stateObj]]"
                  hass='[[hass]]'
                  element-name='[[controlElement]]'>
              </dynamic-element>
              <template is='dom-if' if='[[isConfirmControls(stateObj)]]'>
                <div id="overlay" on-click='clickHandler'>
                  <template is='dom-if' if='[[stateObj.attributes.confirm_controls_show_lock]]'>
                    <iron-icon id="lock" class$="[[controlElement]]" icon="mdi:lock-outline"></iron-icon>
                  </template>
                </div>
              </template>
            </div>
          </template>
          <template is='dom-if' if='[[!controlElement]]'>
            <div class='state'>[[computeStateDisplay(stateObj)]]</div>
          </template>
        </template>
      </div>
      `}static get properties(){return{hass:Object,inDialog:{type:Boolean,value:!1},stateObj:Object,controlElement:String,extraObj:{type:Array,computed:"computeExtra(hass, stateObj, _attached)"},_attached:Boolean,extraObjVisible:{type:Boolean,computed:"computeExtraVisible(extraObj, inDialog)"}}}connectedCallback(){super.connectedCallback(),this._attached=!0}disconnectedCallback(){this._isAttached=!1,super.disconnectedCallback()}computeExtra(t,e,s){if(!e.attributes.extra_badge||!s)return[];let i=e.attributes.extra_badge;return Array.isArray(i)||(i=[i]),i.map(s=>{let i=null;if(s.entity_id&&t.states[s.entity_id]?i=Object.assign({},window.customUI.maybeChangeObject(this,t.states[s.entity_id],this.inDialog,!1)):s.attribute&&void 0!==e.attributes[s.attribute]&&(i={state:String(e.attributes[s.attribute]),entity_id:"none.none",attributes:{unit_of_measurement:s.unit}}),!i)return null;let n=s.blacklist_states;return void 0!==n&&(Array.isArray(n)||(n=[n]),n.some(t=>RegExp(t).test(i.state.toString())))?null:(i._entityDisplay="",i.attributes=Object.assign({},{friendly_name:""}),i)}).filter(t=>null!=t)}computeExtraVisible(t,e){return!(e||!t)&&0!==t.length}extraClass(t){return t?"extra":""}_showControl(t,e){return!!t||!e.attributes.hide_control}computeStateDisplay(t){return super.computeStateDisplay(this.haLocalize||this.localize,t)}isConfirmControls(t){return t.attributes.confirm_controls||t.attributes.confirm_controls_show_lock}clickHandler(t){this.root.querySelector("#overlay").style.pointerEvents="none";const e=this.root.querySelector("#lock");e&&(e.icon="mdi:lock-open-outline",e.style.opacity="0.1"),window.setTimeout(()=>{this.root.querySelector("#overlay").style.pointerEvents="",e&&(e.icon="mdi:lock-outline",e.style.opacity="")},5e3),t.stopPropagation()}applyThemes(t,e,s){const n=s.attributes.theme||"default";i(e,t.themes||{default_theme:"default",themes:{}},n)}extraDomChanged(){this.root.querySelectorAll("ha-state-label-badge").forEach(t=>{this.applyThemes(this.hass,t,t.state)})}})}),Polymer&&Polymer.Element&&customElements.get("home-assistant")?ht():customElements.whenDefined("home-assistant").then(()=>ht()),Polymer&&Polymer.Element&&customElements.get("home-assistant")?pt():customElements.whenDefined("home-assistant").then(()=>pt()),Polymer&&Polymer.Element&&customElements.get("home-assistant")?mt():customElements.whenDefined("home-assistant").then(()=>mt()),Polymer&&Polymer.Element&&customElements.get("home-assistant")?gt():customElements.whenDefined("home-assistant").then(()=>gt())},function(t,e){window.JSCompiler_renameProperty=function(t){return t}}]);
//# sourceMappingURL=scripts.js.map
//# sourceURL=https://***.***.***.***:8123/local/custom_ui/state-card-custom-ui.html.js
:0:0 Script error.

I don’t recall when it started to happen but it wasn’t with 105.

Posts: 10

Participants: 2

Read full topic

Hassio no longer see's Conbee2 after supervisor upgrade

$
0
0

@ndinadis wrote:

Hassio no longer see’s Conbee2 after supervisor upgrade, I am using zha integration not deconz. The line entry under hardware no longer shows either?

Mon Feb 10 2020 19:41:29 GMT-0500 (Eastern Standard Time)
Error setting up entry /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2122921-if00 for zha
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/serial/serialposix.py", line 244, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2122921-if00'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 215, in async_setup
    hass, self
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 103, in async_setup_entry
    await zha_gateway.async_initialize()
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 125, in async_initialize
    await radio.connect(usb_path, baudrate)
  File "/usr/local/lib/python3.7/site-packages/zigpy_deconz/api.py", line 198, in connect
    self._uart = await uart.connect(device, DECONZ_BAUDRATE, self)
  File "/usr/local/lib/python3.7/site-packages/zigpy_deconz/uart.py", line 120, in connect
    xonxoff=False,
  File "/usr/local/lib/python3.7/asyncio/coroutines.py", line 120, in coro
    res = func(*args, **kw)
  File "/usr/local/lib/python3.7/site-packages/serial_asyncio/__init__.py", line 410, in create_serial_connection
    ser = serial.serial_for_url(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/serial/__init__.py", line 88, in serial_for_url
    instance.open()
  File "/usr/local/lib/python3.7/site-packages/serial/serialposix.py", line 247, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2122921-if00: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2122921-if00'

Posts: 1

Participants: 1

Read full topic

Buienradar not showing temperature

$
0
0

@joryvd wrote:

Hello all,

I tried to add the buienradar weather component to my home assistant instance. I managed to add it and choose the desired weather station (schiphol). However when I create a lovelace weather card it doesn’t show the current temperature or any other sensors. It does however show the forecast.
I have another home assistant running at my parents house, also with an buienradar weather card. On their system the weather card shows a lot more info including the current temperature and pressure. They are also using the schiphol weather station.
I checked the configuration side by side and there’s nothing I can find that differs.
I’m at a loss here and would love some help figuring it out!

Some additional info:
On the log I am getting the following errors:

2020-02-11 02:25:39 WARNING (MainThread) [buienradar.buienradar_json] Data element with key=‘rainlasthour’ not loaded from br data!
2020-02-11 02:25:39 WARNING (MainThread) [buienradar.buienradar_json] Data element with key=‘temperature’ not loaded from br data!
2020-02-11 02:25:39 WARNING (MainThread) [buienradar.buienradar_json] Data element with key=‘feeltemperature’ not loaded from br data!
2020-02-11 02:25:39 WARNING (MainThread) [buienradar.buienradar_json] Data element with key=‘visibility’ not loaded from br data!

Thanks!

Posts: 1

Participants: 1

Read full topic

Hacs install going wrong

$
0
0

@chrispudge wrote:

hacs install going wrong…

im trying to install hacs and i followed the instructions step by step - i copied over the hacs folder to a subfolder called custom_configuration under the config folder. something i see though is the .translations folder is showing as hidden - even if i mark it as unhidden it reverts back to hidden

when i go to integrations and click add HACS doesnt show up…any ideas what im missing here? running hass.io on rpi3b+

Posts: 4

Participants: 3

Read full topic

Viewing all 107714 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>