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

History data for a 7day history stacked bar chart

$
0
0

@xned wrote:

I have been playing around with HomeAssistant for about a month now and its really impressive.
But there is one thing I would like to do that I just cannot figure out how to do or if its possible to do.

Background:
In our house we have a rule that our son is only allowed to play games on the computer for one hour a day. All his games are on steam so using HA i built a steam game sensor and use the history graph (see pic).

Using this I can see how long he has played and what game when hovering over. I would like to expand on this and here I have run into a brick wall.
I would like to have a rolling 7 day stacked bar graph showing how much he has played per day and what game.

I think the main problem is that I need a sensor that records the time played per game. In HA logic I think that would be the time the sensor is in a state.
I looked at the History Stats sensor (https://www.home-assistant.io/integrations/history_stats/) but as I understand it you need to define the states that you want to measure time on. That would require me to manually add all games he has and need to edit the sensor every time he gets a new game and I don’t like static systems. Is there a way to record a sensor state and time in the state? Like the standard history graph is doing?
What I have read leads me to believe that if I have data in that format grafana can make the stacked bar chart anyone know if that is correct?

TLDR: I want a 7day history stacked bar chart of time played per game, how do I do that?

Posts: 1

Participants: 1

Read full topic


[host] is an invalid option for [sensor.apcupsd]

$
0
0

@coza73 wrote:

Since updating to 0.109.0 I am getting an error stating:

Invalid config for [sensor.apcupsd]: [host] is an invalid option for [sensor.apcupsd]. Check: sensor.apcupsd->host. (See ?, line ?). 

According to the current documentation for this intergration “host” is a valid option.

Here is my config that has not changed for my intergration

- platform: apcupsd
  host: 192.168.178.59
  resources:
  - apc
  - date
  - hostname
  - version
  - upsname
  - cable
  - driver
  - upsmode
  - starttime
  - model
  - status
  - linev
  - loadpct
  - bcharge
  - timeleft
  - mbattchg
  - mintimel
  - maxtime
  - outputv

Can anyone help with this?

Posts: 3

Participants: 2

Read full topic

Implicit presence detection

$
0
0

@Edo78 wrote:

Hi guys,
I already have a presence detection based on tracking of multiple devices in multiple ways (eg. nmap, bluetooth, gmap, etc) but this can work only for known devices.
Actually I didn’t have any PIR sensor (nor I have plan to buy them in the near future) but I want to implicitly detect presence in the house based on status changes of actual integration.

For example if the TV is turned on then someone is at home, if someone start using a google home mini then someone is at home, if a switch is manualy turned (eg. a Shelly) then someone is at home …

I wonder what’s the best way to achieve such result.

Any suggestions?

Posts: 4

Participants: 2

Read full topic

Template sensor loose value when rebooting

$
0
0

@sermayoral wrote:

Hi, I have this template sensor:

sensor:
  - platform: template
    sensors:
      cop:
        friendly_name: "COP"
        value_template: 1.0
        unit_of_measurement: "M"
        icon_template: mdi:thermometer-lines

I assign the value in a python_script depending of many factors.

The problem is when i reboot Home Assistant. The sensor is 1.0 again. Is there any way to get the last known value of this sensor before using the 1.0 value?

I try this:

value_template: "{{ 1.0 if value is none else value }}"

But it is not working

Posts: 2

Participants: 2

Read full topic

Help? Error handling message: required key not provided @ data['category']. Got None

Cannot open HA dev repo cloned into WSL , as Container

$
0
0

@ninjadog wrote:

Trying to start development of plugins/addons for HA, using WSL2 [Debian] and VS Code on Windows. Followed this guide:

All extensions in VS Code installed, setup seems to work fine and all checks reporting correct results.

So, I opened my WSL terminal, moved into the HA cloned repo, and entered the command code . Sure enough VS Code started and presented the folder in WSL mode. I tried F1 Remote-Container: Open folder in Container but the option was missing. There are very fre Remote-Container: options. So I opened the repo locally (Windows) and now the option Remote-Container: Open folder in Container was available , so I selected it. Took a while but threw this error:

SECURITY WARNING: You are building a Docker image from Windows against a non-Win
dows Docker host. All files and directories added to build context will have '-r
wxr-xr-x' permissions. It is recommended to double check and reset permissions f
or sensitive files and directories.
[187347 ms] Start: Run: git rev-parse --show-toplevel
[187701 ms] Start: Run: docker events --format {{json .}} --filter status=started
[187748 ms] Start: Starting container
[187748 ms] Start: Run: docker run -a STDOUT -a STDERR --mount type=bind,source=//wsl$/Debian/home/daz/homeassistant/vscode-remote-try-node,target=/workspaces/vscode-remote-try-node,consistency=cached -l vsch.quality=stable -l vsch.remote.devPort=0 -l vsch.local.folder=\\wsl$\Debian\home\daz\homeassistant\vscode-remote-try-node --entrypoint /bin/sh vsc-vscode-remote-try-node-13bd8b4f47fbd65d0f4eb11d7f94b8df -c echo Container started ; while sleep 1; do :; done
C:\Program Files\Docker\Docker\resources\bin\docker.exe: Error response from dae
mon: invalid mount config for type "bind": bind source path does not exist: /wsl
$/Debian/home/daz/homeassistant/vscode-remote-try-node.
See 'C:\Program Files\Docker\Docker\resources\bin\docker.exe run --help'.
[188447 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=\\wsl$\Debian\home\daz\homeassistant\vscode-remote-try-node --filter label=vsch.quality=stable
[188873 ms] Command failed: docker run -a STDOUT -a STDERR --mount type=bind,source=//wsl$/Debian/home/daz/homeassistant/vscode-remote-try-node,target=/workspaces/vscode-remote-try-node,consistency=cached -l vsch.quality=stable -l vsch.remote.devPort=0 -l vsch.local.folder=\\wsl$\Debian\home\daz\homeassistant\vscode-remote-try-node --entrypoint /bin/sh vsc-vscode-remote-try-node-13bd8b4f47fbd65d0f4eb11d7f94b8df -c echo Container started ; while sleep 1; do :; done

Something is wrong but I have no idea.
Also, why couldnt I open the HA repo , clonded to WSL, in a container from VS code?

Setup is:

Windows 10 Home build 19041 64bit , reports:
Virtualisation-based security	Running
Virtualisation-based security required security properties	
Virtualisation-based security available security properties	Base Virtualisation Support
Virtualisation-based security services configured	
Virtualisation-based security services running	
Device Encryption Support	Reasons for failed automatic device encryption: TPM is not usable, PCR7 binding is not supported, Hardware Security Test Interface failed and the device is not Modern Standby, Un-allowed DMA-capable bus/device(s) detected, TPM is not usable
A hypervisor has been detected. Features required for Hyper-V will not be displayed.	

VS Code version 1.44.2

WSL is enabled in Windows and Kernel Update package applied
C:\Users\daz>wsl -l -v
  NAME                   STATE           VERSION
* Debian                 Running         2
  docker-desktop         Running         2
  docker-desktop-data    Running         2
C:\Users\daz>

Docker Desktop Edge installed on Windows
Docker version 19.03.8, build afacb8b

Docker in WSL installed:
Docker version 19.03.8, build afacb8b7f0

And I can run docker run hello-world both in WSL and Windows. Works fine.

So what’s the issue with opening the HA repo, cloned into WSL, as a Container using VS Code installed into Windows ?

Posts: 1

Participants: 1

Read full topic

Lovelace open "add card" panel on connect

$
0
0

@sonusss wrote:

I restarted my HA instance having lovelace UI in edit mode and from now on eveytime I connect any browser to HA it open the home page with the “add card” panel overlay but UI edit mode is off. Any clue how to solve this ? I suppose it is just a flag somewhere…

Posts: 1

Participants: 1

Read full topic

Caldav error in 0.109

$
0
0

@greengolfer wrote:

Hello,
I have just testing caldav on my hassio installation running 0.109.
Caldav server access works when used from eg calendar app on macos.
However, in ha it doesn’t. The debug log shows:

2020-04-30 12:27:27 ERROR (MainThread) [homeassistant.components.calendar] caldav: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 472, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/caldav/calendar.py", line 143, in update
    self.data.update()
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 240, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/caldav/calendar.py", line 206, in update
    vevent = event.instance.vevent
AttributeError: 'NoneType' object has no attribute 'vevent'

I have events in the calendar… So I am not sure where to search.
I have put the logger to debug level, not more detail.

Clues welcome!
GV

Posts: 1

Participants: 1

Read full topic


Moving my Zigbee Co-ordinator

$
0
0

@Pete wrote:

Hi all,

I am using zigbee2mqtt to control all my zigbee devices.

My zigbee co-ordinator is plugged into my Unraid server running homeassistant as a VM.
This works really well except for one thing. Due to the location of the server and the weird layout of my house, all the zigbee devices have a low link quality. I tried connecting an external antenna to my co-ordinator that hasn’t improved things much. I’m running quite a few powered devices and my zigbee mesh shows them all connected, but that really hasn’t improved things much.

I’m thinking of moving the co-ordinator to a different location in the house (the server would stay where it is).

Any pointers to get me started?

Has anyone done this and how do I connect the co-ordinator back to my Home assistant instance. I have ethernet throughout the house, so I’m assuming something like a rPi? What software and how to connect it.

Thanks

Posts: 2

Participants: 2

Read full topic

Utility meter crashes browser - how to delete history?

$
0
0

@ganey wrote:

I have an energy meter sensor setup via samsung smarthings.

My utility meter config now looks as follows:

utility_meter:
  daily_energy:
    source: sensor.bulb_energy_meter_energy_meter
    cycle: daily
    tariffs:
      - peak
      - offpeak
  monthly_energy:
    source: sensor.bulb_energy_meter_energy_meter
    cycle: monthly
    tariffs:
      - peak
      - offpeak

I have several months of single tariff history but recently added the peak / offpeak tariff.

If I click any of the utility_meter cards in the UI to view the graph, the laptop fans spin up and the browser crashes.

I’m guessing the HA doesn’t know what to do with the old data and gets stuck in a loop.

Is there a way I can delete the historic utility meter data?

I tried using the service reset but from what I gather from reading other posts, this doesn’t affect the history

Posts: 3

Participants: 2

Read full topic

Customization in JS not working

$
0
0

@Mariusthvdb wrote:

have a set of input_booleans in the form of

input_boolean.github_home_assistant for each of the repo’s I follow with my sensors, which have the same object_id’s: sensor.github_home_assistant.

I like to customize_glob these sensors, based on the state of the input_boolean:

    sensor.github_*:
      templates:
        icon_color: >
          var repo = entity.entity_id.split('.')[1];
          if (entities['input_boolean.' + repo].state == 'on') return 'gold';
          return 'steelblue';

which somehow doesn’t work just yet.

anyone can see the error I make?

Believed entity.entity_id.split('.')[1] should be github_home_assistant in this example, leading to

  if (entities['input_boolean.' +'github_home_assistant'].state == 'on') return 'gold';
          return 'steelblue';

which would be

 if (entities['input_boolean.github_home_assistant'].state == 'on') return 'gold';
          return 'steelblue';

inspector says:

Posts: 1

Participants: 1

Read full topic

How to skip notification from history

$
0
0

@madSnuif wrote:

Notifications show up in my history. I don’t want that but these seems neither domain or entity. Any ideas how to get rid of these in my history?

Max

Posts: 1

Participants: 1

Read full topic

Template sensor calculations when values don't exist

$
0
0

@Bobby wrote:

I’m pulling some data from a restAPI from my Neurio, but occasionally the connection is reset or fails and the restAPI call gets nothing. I’ve got sensors set for real time consumption and generation and those sensors do a good job of dealing with the fact there’s a failure. No blips in my graphs, they seem to just ignore the fact there was no data for a moment. This is desired.

        unit_of_measurement: Ws
        value_template: "{{ state_attr('sensor.neurio_raw', 'channels')[3]['eImp_Ws']  }}"

image

Then I have a second set of sensors that do some math based on those real time numbers. Those sensors DON’T handle the fact that the restAPI call failed and that the sensors these calculations are based on don’t exist for a moment and as such, I get a graph like this below for the following sensor:

      calculated_generation:
        friendly_name: 'Daily Generation'
        unit_of_measurement: 'kWh'
        value_template: "{{ ((states('sensor.generation_imported') | int - states('input_number.generation_at_midnight') | int) / 3600000) | round(2) }}"

image

What can I do to account for this erroneous data and bring my graph back to normal/accurate?

Posts: 2

Participants: 2

Read full topic

Question about HA ZWave Alternatives

$
0
0

@febalci wrote:

Currently i am using HA native ZWave cpomponent in yaml configuration. Now i see also qt5-openzwave, ZWave to MQTT Hassio addon, ZWave over MQTT community integration addon etc.

I know that native ZWave uses openzwave 1.4. And guess that the others are using 1.6. In total, what do you suggest to use as of now; considering pros and cons?

Posts: 1

Participants: 1

Read full topic

Can't access via http://hassio.local:8123/ after upgrading SD card

$
0
0

@Hass10 wrote:

So I recently upgraded my SD card for my HassIO and had no issues flashing my backup onto the card.

I’ve changed no settings my on my Router (still the same Pi and IP address), however for some reason I can no longer connect via http://hassio.local:8123/ and need to connect via my IP xxx.xxx.xxx.xxx:8123

Now obviously it’s not the end of the world if I can’t get the previous connection to work, but I’d like to understand why still :slight_smile:

Posts: 1

Participants: 1

Read full topic


After updating to 0.109 integration and graphs

$
0
0

@Matt_Barnes wrote:

After updating to 0.109 I miss the way you used to be able to click into an integration and click on an entity and see a graph / history of its status.

Was really useful for seeing how long OpenMQTT had been disconnected etc.

I guess the functionality went for a reason but I miss it.

Posts: 1

Participants: 1

Read full topic

Deconz cannot pair sensors now

$
0
0

@Matt_Barnes wrote:

I had two aqara temp sensors and an aqara door sensor working on Deconz through Raspbee premium plugged into serial on my Pi running HA.

I noticed the Door sensor had stopped updating so deleted it and tried to re-pair it with no luck.

I then reset my gateway to see if that would help and updated the Deconz addon.
Now I have no sensors (to be expected) but also cannot re-pair them back.

I have Deconz addon 5.3.2
I have HA 0.109.1
I have a raspbee premium connected
The integration has given me a gateway name 00212E04102E

As well as not being able to pair my devices now I cannot update the firmware on the gateway, it says update successful but then when you go back in it says the same update is available again.

Any thoughts?

Posts: 1

Participants: 1

Read full topic

No Controller

$
0
0

@mernst wrote:

I am trying to setup ZWAVE2MQTT. I have followed all of the steps in the "
ZWAVE2MQTT add-on simple tutorial". However, when i go to control panel, I have no controller. I am using a Nortek HUSBZB-1. The Zigbee portion is working fine. Can someone help me get the zwave portion recognized as the controller?

Thanks,
Mike

Posts: 1

Participants: 1

Read full topic

Would this be possible - postbox notification

$
0
0

@fredd589 wrote:

Hi all, I recently added an aqara door sensor to my letterbox, it works great and I’ve set up automation to notify me if it’s been opened.

I would like to have an entity on Lovelace if the letterbox has been triggered that day (post being delivered) and shows a message like ‘you have post!’ but for it to disappear if the letterbox is triggered again (ie I open it to get the mail).

Does anyone have an idea as to how I go about something like this, I can do normal automation, but this seems complicated!

Thanks

Posts: 1

Participants: 1

Read full topic

How to combine sensors from different esp32s?

$
0
0

@luciandf wrote:

Hello all,

I am trying to configure my system so I can start with a nice organization from the beginning. At the moment my system is not very complicated by I am planning of adding various things to it.

What I have at the moment is as follows:

  1. Esp32 which has three bluetooth temperature and humidity sensors attached to it and one DHT22 temperature and humidity hardwired to it. This one sits upstairs in the house and monitors the temperature and humidity there.

  2. Esp32 with I water level sensor which is a normal binary sensor and a switch that triggers a relay. This one is used to water flowers and I plan to add a soil humidity sensor when it arrives from China.

  3. Esp32 with bluetooth temperature and humidity sensor connected to it (plus whatever will be added in the future). This one monitors tempearture downstairs.

I would like to group all temperature sensors in a sensor.yaml file. Is such a thing possible? How would I tell first esp32 which sensors are attached to it and which sensors are attached to the rest of the boards?

The reason why I want this is becuase I would like to write a python script eventually where I would like to read the temperature values in all the rooms and perform some operations with them and chose when to turn on a water heater.

I am not sure if it makes sense what I want to do but I am quite confused about how to organize things to make them more accessible from python scripts.

Thank you!

Posts: 1

Participants: 1

Read full topic

Viewing all 107693 articles
Browse latest View live


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