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

Theme: change the table header background color?

$
0
0

Team,

I would like to change the background color of table headers (like the one for entities, devices, automations, scenes, scripts and more.

Why?
Default background colors:

  • white: Page background
  • white: Header
  • white: Searchbox
  • white: Table header
  • white: Table content: white

For me it would be better to separate these using the background color.
Step 1 is the table header.

Most of these table headers look like this:

<div class="mdc-data-table__header-row" role="row" aria-rowindex="1">

Using the inspector I can change the CSS to include:

.mdc-data-table__header-row {
    background-color: yellow;
    <existing_rows_here>
}

So I added this to the config, but it does nothing:

frontend:
  themes:
    djstheme:
      mdc-data-table__header-row: yellow

Any idea how I could make this change?

Cheers!
DJ

1 post - 1 participant

Read full topic


What happens if i run an automation to change colour for a light but the light isn't on

$
0
0

Would it wait until the light was on ?

I currently have a automation set to run at 07:00 to set all lights to white, to reset all the colours from the evening before. But others may have switched these physically off.

What would happen?
What would be the best way to solve this ? Set conditions?

Thanks everyone.
-atv

1 post - 1 participant

Read full topic

Plex media player - connection reset by peer

$
0
0

Playback state and tracking all works fine, but trying to send controls from the cards results in

Failed to call service media_player/media_play_pause. ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

The Plex Server reports

Request: plaintext connection from 10.14.16.21:36896 rejected because secure connections are required

Secure connections are required on the server. Any ideas why playback state would show up, but sending commands fails? I would expect both to either work or fail, given the error reported…

1 post - 1 participant

Read full topic

Template time minus 1 second

$
0
0

I want my shutters up by sunrize, but not before a certain time but also at least at this certain time.

So I did this :

alias: Rolluiken 's morgens op
description: ''
trigger:
  - platform: sun
    event: sunrise
    offset: '0'
  - platform: time
    at: input_datetime.tijdstip_rolluik_morgen
condition:
  - condition: time
    after: input_datetime.tijdstip_rolluik_morgen
action:
  - service: script.rolluiken_automatisch_op
mode: single

But this means that in summer this willl cause a problem, cause when it goes off on the time of the helper the condition will never be ok (will be equal and not ‘after’).

So I have to create a template as condition, where the time of the trigger must be greater that the helper minus 1 second…but how do I do this ?

2 posts - 2 participants

Read full topic

Dynamic list of Destinations based on Zones, and useable by Waze

$
0
0

Finally have this working the way I had envisioned and hoped I could!
I am using Waze but that is somewhat beside the fact.
I tried all sorts of ways and means but this is the final working result which seems simple now!
First I created a new drop-down helper input_select.destination and preset it with Home.
Second is an automation to update the list based on Zones’ friendly names, and triggered by a state change in zones:

alias: Update Destinations
description: ''
trigger:
  - platform: event
    event_type: state_changed
condition:
  - condition: template
    value_template: '{{ trigger.event.data.new_state.domain == "zone" }}'
action:
  - service: input_select.set_options
    target:
      entity_id: input_select.destination
    data:
      options: |
        {%- set ns = namespace(items=[]) -%}
        {% for entity in states.zone -%}
          {%- set ns.items = ns.items + [entity.name | trim(",")] -%}
        {%- endfor %}
        {{ ns.items }}
mode: parallel
max: 25

The other part is a Waze selectable sensor destination:

sensor:
  - name: Destination address
    unique_id: dest_address
    state: "{{ states('input_select.destination') }}"

image

image

1 post - 1 participant

Read full topic

Integrating individual device energy usage

$
0
0

The Home Assistant documentation on Individual Energy Sensors is quite short

How can i add Plugwise PowerPlugs as Individual Devices? I`m using a Custom Intergration named “plugwise” for the Plugwise Stick

which i installed using

cd /home/homeassistant/.homeassistant/custom_components
wget https://github.com/brefra/python-plugwise/raw/master/example/plugwise_stick.zip
unzip plugwise_stick.zip

1 post - 1 participant

Read full topic

Any Zero cooling timeout motion sensor out there?

$
0
0

All zigbee motion sensors i saw so far, have like 60 secs or more cooling timeout after it registers a motion; to go from on to off. I use aqara sensors and made the hack o decrease it down to 5-10 seconds. I get it, since they are using batteries; it is wise to not register each and every motion, in order to conserve battery life.

I, on the other hand, have a commercial alarm system with an IP card, which has door/window and PIR sensors, all cabled. It is working in HA, i can see each and every move in HA. It even has a cooling timeout of liked 0.5 to 1 second. So i can make the system response according to my needs easily, instead of leaving the decision to the sensor itself.

The cabling for this alarm system is laid out in the construction time of the house, so i can not extend it to every place i like. That’s why i am using aqara sensors in some extra places. But almost all aqara locations has power outlet nearby, so i was wondering if there is any commercial or diy zigbee product that can be plugged in (USB powered?) which will have like 0.5 to 1 second cooling time. Blitzwolf has BW-IS3 which can be USB powered to recharge its battery but it still has 60 seconds cooling time…

1 post - 1 participant

Read full topic

Self-consumed solar energy, calculating per phase, but needs balanced

$
0
0

Hi,

i’ve set up my Shelly 3em with home-assistant, and really love the information it gives me. But the “Self-consumed solar energy” is calculated wrong/different, compared to how the realy energy meter in the house works.
Maybe there is a different way to configure it correctly:

I have added each of the three phases (Energy) as a seperate entry in “Grid consumption”.
Also each of the three returns of each phase in “Return to grid”.

This gives me a per phase view/calculation. But the energy meter balances returns with consumption, only if in total there is any return it really counts.

Is there any specific settings to define this, or to i need to configure summed-up values for consumption and return to use in the energy dashboard? I quite like to be able to see each phase there.

1 post - 1 participant

Read full topic


Energy dashboard - Update of prices - What with history

$
0
0

Hey,

Soon the prices for my energy consumption and injection will change.
But now I am wondering what it will do with my history.

Will the history show the calculation with the new price?
Or will data only be stored with the new price as from the moment of the change?

I prefer the later, so I can check my final energy bill correctly :slight_smile:

1 post - 1 participant

Read full topic

"Failed to connect" when trying to integrate Shelly 2.5 configured as shutter

$
0
0

Hi all,

I am trying to integrate a Shelly 2.5 with latest stock firmware into my Home Assistant installation. The Shelly is configured to use the Home Assistant host’s IP and port 5683 as per the integration documentation:

When I try to add the Shelly integration in Home Assistant I am asked for a host. I enter the Shelly’s IP Adress assuming this is what needs to be entered there and a few seconds later I get a “Failed to connect”

There is nothing in the Home Assistant logs pointing to an error. The Shelly logs see that the Home Assistant host is connecting, but nothing happens:

135715985 mgos_http_server.c:180  0x3fff301c HTTP connection from 172.16.0.4:53252
135748966 mgos_http_server.c:180  0x3fff314c HTTP connection from 172.16.0.4:53254
135779871 mgos_http_server.c:180  0x3fff3204 HTTP connection from 172.16.0.4:53256
135899160 mgos_http_server.c:180  0x3fff3244 HTTP connection from 172.16.0.4:53258

I would be grateful for any pointers how to debug this further or fix it.

I am running Home Assistant OS 2012.12.9:

System Health

version: core-2021.12.9
installation_type: Home Assistant OS
dev: false
hassio: true
docker: true
user: root
virtualenv: false
python_version: 3.9.7
os_name: Linux
os_version: 5.10.63-v8
arch: aarch64
timezone: Europe/Berlin

logged_in: false
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok

host_os: Home Assistant OS 7.1
update_channel: stable
supervisor_version: supervisor-2021.12.2
docker_version: 20.10.9
disk_total: 28.7 GB
disk_used: 3.6 GB
healthy: true
supported: true
board: rpi4-64
supervisor_api: ok
version_api: ok
installed_addons: Studio Code Server (4.1.0), Node-RED (10.3.3)

dashboards: 1
resources: 0
views: 1
mode: storage

api_endpoint_reachable: ok

My Shelly is configured fine, shutter is calibrated and working as expected when using the Shelly’s built-in web interface. It is running latest stock firmware 20211109-125214/v1.11.7-g682a0db.

1 post - 1 participant

Read full topic

RFXTRX: can it ignore certain devices?

$
0
0

When I set my RFXTRX to “enable automatic add”, it takes about 1 week to have 200 non-existing devices in my setup.

RM174RF Smoke Detector 

Guess one of my neighbors has a device that keeps sending signals :wink:

Any idea if it’s possible to ignore a specific device from being added? (without disabling automatic add)

1 post - 1 participant

Read full topic

Ezviz Camera Integration BC1C - No RTSP port available

$
0
0

Hi,
I am trying to configure the Ezviz integration with my 4 cameras.
It worked for 3 of those but I have issues with the model BC1C.
It appears in the list of cameras to be configured in Home Assistant, but there is no way I can complete the configuration.
I made a few tests with VLC but apparently, there is no port 554 available.
The only way to access it is using port 8000
Can someone help please?

1 post - 1 participant

Read full topic

How to edit MariaDB file datapoints

$
0
0

Hi,

I am using MariaDB on my home assistant OS to manage the database. The solaredge integration reports wrong values sometimes, so I wanted to delete this wrong value, as it messed up the overview.
However, I can not find the MariaDB file to edit it and delete this datapoint or write any script that deletes outliers.

How can I find this MariaDB file and edit it?

Thanks in advance!

1 post - 1 participant

Read full topic

Solar Panels - No matching statistics found

$
0
0

Hello,

I have added new sensor, that takes state from “variable”
it looks like like this:

 template:
   - sensor:
       - name: "Actual Power"
         unit_of_measurement: "W"
         state:  "{{ states('var.pv_power') }}"
         device_class: power
         state_class: measurement

Value is correct, seeems like there are no errors

The idea was to make it avaiable to select in the “Energy” tab, but seems like something more is missing im unableto select it. What else sould be done? Isnt the device_class and state_class enough ?

1 post - 1 participant

Read full topic

Is "cover: stop" not supported by Alexa Smart Home Skill?

$
0
0

Hi,

I have a doubt about how the Alexa Smart Home Skill handles the cover.stop_cover service and if it can handle such case at all, because in the relevant documentation it just speaks about of the open/close and set_position services, but doesn’t mention the stop_cover service.

With stop_cover I mean the ability to stop che cover midway during the raising/lowering cycle, that will result in the cover to be in the state open, albeit with the position attribute being <100.

I’ve successfully integrated the Alexa Smart Home Skill in my HA and my covers works fine. I can successfully say open/raise, close/lower and stop cover, but I think the latter command is just a lucky coincidence: my cover device will stop if any commands is issued when they are already moving (e.g. when the cover is opening, if I send the command open, the cover will stop).

So why I am “complaining”? Well I always had the impression that the stop command was working oddly and recently I was looking at the logbook to look what happens when cover are actioned by Alexa: it turn out that when I utter the command open or close the logbook will report to have used ModeController/SetMode, while when I utter the command stop the logbook will report instead PowerController/TurnOff which sounds off.

image

The voice commands issued to Alexa are spoken in Italian, so translation issue may be involved (I won’t say “Alexa, stop cover” which would be mouthful in Italian, but I’ll say “Alexa, ferma tapparella”.

So my question is: how I can get the full log of the command issued by Alexa to HA? What SetMode
is set to? Which serviced are called by each Alexa command?

(my covers do not support set_position so I can’t use any utterence that relies on RangeController, i.e. "Alexa, set cover to 50% would not work)

1 post - 1 participant

Read full topic


Looping through states in an automation?

$
0
0

Hello,

I’ve read the docs and some of the examples in the forum which aren’t quite the same.

I have a bunch of sensors with battery states, and want to trigger notifications when their batteries are running low. I have a lot of sensors and add to them frequently, so I don’t want to have to maintain a hard coded group.

The following template works really well (95% set for demonstration):

{% for state in states if state.entity_id.endswith("_power") and not state.entity_id.endswith("energy_power") -%}
{% if states(state.entity_id) | int < 95 %}
  {{ state.entity_id }} is running at {{ states(state.entity_id) }}%
{% endif %}
{%- endfor -%}

which looks like this:

image

What I would then like to do is trigger off a notification, every morning at 9am:

service: notify.mobile_app_pixel_2
data:
  title: 'Low battery: {{state.entity_id}}'
  message: '{{ state.entity_id }} is running at {{ states(state.entity_id) }}'

When I try to combine both into the Automation → Action → Edit as YAML GUI:

{% for state in states if state.entity_id.endswith("_power") and not state.entity_id.endswith("energy_power") -%}
{% if states(state.entity_id) | int < 95 %}
service: notify.mobile_app_pixel_2
data:
  title: 'Low battery: {{state.entity_id}}'
  message: '{{ state.entity_id }} is running at {{ states(state.entity_id) }}'
{% endif %}
{%- endfor -%}

it appears this isn’t the “HA way” to accomplish what I’m looking for.

I’d love to keep this automation inside YAML rather than use python scripts, but if that’s not possible thanks for letting me know.

Amadeus

1 post - 1 participant

Read full topic

Syntax help - a 'not' condition within a choose / sequence in a script

$
0
0

Hey folks. I’m sure this is an easy one for someone, so apologies in advance!

I’m trying to do a not condition within a choose / sequence.
I had a read of the syntax, but it’s there’s no example quite like that.
I thought I had it, but it fails when I check config before reloading. :cry:

Would anyone be able to please point me to my failings in the below?

Thank you! :beer:

# ===============================================================
# Switch Amp to Snug Xbox
# ===============================================================
 
 switch_amp_to_snug_xbox:
  alias: "Switch Amp to Snug Xbox"
  mode: restart
  sequence:

    - choose:
        - conditions:
            - condition:
                condition: not
                conditions:
                  - condition: state
                    entity_id: sensor.snug_amp_source
                    state: "Xbox"
          sequence:
            - service: media_player.select_source
              data:
                source: "Xbox"

# ===============================================================

4 posts - 3 participants

Read full topic

Webhook question

$
0
0

Hello,
I am trying to get webhooks to work. However, even the most simple example doesn’t work.
What I want to achieve is that I want to be able to click a button on a website and I want to fire a certain webhook. I am using PHP on this website.
This is my code:

		$url = 'https://XXXX.duckdns.org:8123/api/webhook/webhook_test';
		$data = array('key1' => 'value1', 'key2' => 'value2');

		$options = array(
			'http' => array(
				'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
				'method'  => 'POST',
				'content' => http_build_query($data)
			)
		);
		$context  = stream_context_create($options);
		$result = file_get_contents($url, false, $context);

And this shows the following error:

Warning: file_get_contents(https://XXXX.duckdns.org:8123/api/webhook/webhook_test): failed to open stream: Connection refused in XXXX on line 42

Does anyone know what to do or what I’m doing wrong?

1 post - 1 participant

Read full topic

Why are scripts visible in YAML but do not show up in UI?

$
0
0

Below is the UI of my scripts
t


Yet my YAML contains a number of scripts that do not show up in the UI, and I cannot work out why. The partial YAML is below. As you can see Security Alarm - House and Security Alarm - Sonos do not show up in the UI, but Visitors Gone and Someone Home do show up.

So what am I doing incorrectly in the YAML? The only thing I can see is that the alias for the scripts that do not show up have a “-” in the alias, but so do a lot of the other scripts that do show up in the UI.

visitors_gone:
  sequence:
  - condition: state
    entity_id: input_boolean.guest_mode
    state: 'on'
  - service: input_boolean.turn_off
    data:
      entity_id: input_boolean.guest_mode
  mode: single
  alias: Visitors Gone
  icon: mdi:human-greeting

security_alarm_house:
  alias: Security Alarm - House
  icon: mdi:alarm-bell
  sequence:
  - service: sonos_snapshot
    target:
      entity_id:
      - media_player.sonos_living_room
  - service: sonos_unjoin
    target:
      entity_id:
      - media_player.sonos_living_room
  - service: media_player.volume_set
    data:
      volume_level: 1
    target:
      entity_id:
      - media_player.sonos_living_room
  - repeat:
      while:
      - condition: state
        entity_id: input_boolean.security_alarm
        state: 'on'
      - condition: template
        value_template: '{{ repeat.index <= 50 }}'
      sequence:
      - service: media_player.play_media
        data:
          media_content_id: http://homeassistant:8123/local/zapsplat_emergency_alarm_2.mp3
          media_content_type: audio/mp3
        target:
          entity_id: media_player.sonos_living_room
      - delay: 00:00:09
  mode: single

security_alarm_sonos:
  sequence:
  - service: sonos_snapshot
    target:
      entity_id:
      - media_player.sonos_living_room
  - service: sonos_unjoin
    target:
      entity_id:
      - media_player.sonos_living_room
  - service: media_player.volume_set
    data:
      volume_level: 1
    target:
      entity_id:
      - media_player.sonos_living_room
  - repeat:
      while:
      - condition: state
        entity_id: input_boolean.security_alarm
        state: 'on'
      - condition: template
        value_template: '{{ repeat.index <= 50 }}'
      sequence:
      - service: media_player.play_media
        data:
          media_content_id: http://homeassistant:8123/local/zapsplat_emergency_alarm_2.mp3
          media_content_type: audio/mp3
        target:
          entity_id: media_player.sonos_living_room
      - delay: 00:00:09
  mode: single
  alias: Security Alarm - Sonos
  icon: mdi:alarm-bell

someone_home:
  sequence:
  - service: alarm_control_panel.alarm_disarm
    target:
      entity_id: alarm_control_panel.carpe_diem_alarm
    data:
      code: 'xxxxx'
  - service: script.vacation_canceled
  - service: script.evening_lights_on
  - service: script.garden_lights_on
  mode: single
  alias: Someone Home
  icon: mdi:home-city-outline

1 post - 1 participant

Read full topic

Zigbee repeater config

$
0
0

I use zigbee2mqtt with a bunch of temp sensors and some have a very weak or no signal.

I bought a couple of tuya usb repeaters, paired them with zigbee2mqtt but havent really seen an imporvement.

Do I need to configure them somehow?

one device looks like it is talking to the repeater, but the others aren’t.

1 post - 1 participant

Read full topic

Viewing all 106113 articles
Browse latest View live


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