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

Do I need a second zigbee hub?

$
0
0

Hi, I have several tuya zigbee devices that are working via a tuya zigbee hub and tuya cloud.

Currently I‘am planning to install further non-tuya zigbee devices for instance an aqara p1. Is there a way to use my existing tuya zigbee hub or do I have to buy for example a sonoff zigbee stick?

2 posts - 2 participants

Read full topic


Roborock - activate/deactivate a "Cleaning plan" / "Program plan"

$
0
0

I think most of the roborock users know there is a possibility to create cleaning plans in the app (on which day which rooms are cleaned and when). I think that is quiet comfortable und would like to use this, even if i have implemented my vacuums into ha. The main thing here is to have access to the activation/deactivation of this plans. Does someone managed to get access to this via ha. I read a lot the last 1-2 hours in the forum, but don’t find any hint if/where this is possible.

1 post - 1 participant

Read full topic

REST sensor and JSON parsing

$
0
0

Hi, I’m trying to port a JSON API from my jeedom to HA. I have the following in my configurayion.yaml

  - resource: https://www.apicall2.com/api/measures/total?authToken=AAA&deviceId=BBB&measureType=one_phase
    scan_interval: 300
    sensor:
      - name: "MyLight_energy_state"
        value_template: "{{ value_json.status }}"
      - name: "MyLight_energy"
        value_template: "{{ value_json.measure.values.0 | selectattr('type', 'equalto', 'energy') | map(attribute='value') | first }} }}"
        unit_of_measurement: "Ws"

this api call return the following JSON

{
    "status": "ok",
    "measure": {
        "values": [
            {
                "type": "energy",
                "value": 7.950845176516003E10,
                "unit": "Ws"
            },
            {
                "type": "produced_energy",
                "value": 4.063679999352002E10,
                "unit": "Ws"
            },
            {
                "type": "electricity_meter_energy",
                "value": 3.887165177164002E10,
                "unit": "Ws"
            },
            {
                "type": "green_energy",
                "value": 2.6588956860719963E10,
                "unit": "Ws"
            },
            {
                "type": "grid_energy",
                "value": 5.291949490443997E10,
                "unit": "Ws"
            },
            {
                "type": "msb_charge",
                "value": 1.0328050313999996E10,
                "unit": "Ws"
            },
            {
                "type": "msb_discharge",
                "value": 1.0328040039599997E10,
                "unit": "Ws"
            },
            {
                "type": "msb_loss",
                "value": 0.0,
                "unit": "Ws"
            },
            {
                "type": "positive_index",
                "value": 0.0,
                "unit": "kWh"
            },
            {
                "type": "negative_index",
                "value": 0.0,
                "unit": "kWh"
            },
            {
                "type": "grid_sans_msb_energy",
                "value": 4.259145486483997E10,
                "unit": "Ws"
            },
            {
                "type": "autonomy_rate",
                "value": 46.431537881481795,
                "unit": "%"
            },
            {
                "type": "available_power_rate",
                "value": 0.0,
                "unit": "%"
            },
            {
                "type": "self_conso",
                "value": 100.0,
                "unit": "%"
            }
        ]
    }
}```

I easily retreive the status thanks to

 - name: "MyLight_energy_state"
        value_template: "{{ value_json.status }}"

but I struggle to get the energy value.

I have been trying to use JSON Path finder (https://jsonpathfinder.com/)

but none of the bellow seems to return any value

value_template:"{{ value_json.measure.values.0.value}}"

or as proposed by JSON Path Finder 

value_template:"{{ value_json.measure.values[0].value}}"
or
value_template:"{{ value_json.measure.values.[0].value}}"

or, as proposed by ChatGPT

value_template: "{{ value_json.measure.values.0 | selectattr('type', 'equalto', 'energy') | map(attribute='value') | first }} }}"
        unit_of_measurement: "Ws"


I’m running out of idea

Question 2 : as I’m changing my configurayion.yaml, I need to restart HA to test. Is there an easier way to test my code without having to retart HA all the time

Any help would be very welcome

Fred

1 post - 1 participant

Read full topic

Statistics graph card - Why is "1 day" displaying as more than 24h?

$
0
0

I am using the statistics graph card to display a number of stats.
I have noticed, though, that while I have set the “Days to show” to 1, the duration shown in the chart is not 24h, but 24h plus 45mins.

It is not clear to me why, is there a way to force it to exactly 24h?

This is quite awkward, as I would like to use these charts to compare how an indicator today, eg my PV generation or power consumption, compares to the same time yesterday. This would be easy if the chart was exactly 24h wide; I could compare the start point of a chart line against its end. But with slightly more than 24h this becomes a more awkward guessing game.

1 post - 1 participant

Read full topic

IP Addresses

$
0
0

Hi there,

I hope I’ve put this in the right category as it probably falls under more than one.

Recently I’ve been having problems with automations not working properly and devices dropping on and offline in Home Assistant. After doing some digging around in the network settings I found Docker has IP 172.30.232.1, home assistant OS has IP 172.30.32.1, the host IP is 192.168.0.2xx and one showing as “Lo” of 127.0.0.1 which I know is loopback.

Could someone advise if this seems right? To me, this doesn’t seem right as I can’t see how they all talk to each other let alone how port forwarding entries can work with several different IP’s and I also don’t understand why it would be using loopback either. Shouldn’t they all be using the host IP?

I’ve tried looking for network config for them all but have only found the main host network config in the UI. I spent hours in the file editor seeing if I could find anything to give a clue about these IP’s

I run Home Assistant via Vbox on a designated mini Windows 10 PC. Docker Machine has never been installed so am a little confused as to why it’s showing in HA so wonder if this could be the cause of my issues.

Any help or suggestions from those of you more experienced gratefully received :blush:

Cheers
Darryl

1 post - 1 participant

Read full topic

Publish to specific MQTT topic when entity state changes

$
0
0

I have two sensors for my BMW. The battery soc and the range. I need the values to specific mqtt topics, when their state changes.

sensor.i3_120_verbleibende_batterie_in_prozent needs to be published to openWB/set/vehicle/1/get/soc

sensor.i3_120_verbleibende_reichweite_insgesamt needs to be published to openWB/set/vehicle/1/get/range

Whats the easiest way to achieve that? I already saw there’s an integration MQTT statestream, but thats not what I need as I cannot specify the topic where to publish the new state.

Thanks in advance for your help

1 post - 1 participant

Read full topic

Record.camera not audio recording

$
0
0

Hello. New here.

I have a camera stream with audio (i can hear it in home assistant with firefox browser) but if i record that stream (with camera.record) audio is disable (in the same browser)

What i am doing wrong? (i use go2rtc and also works fine, audio is enable)

Thanks

1 post - 1 participant

Read full topic

Custom python script for publishing sensor values

$
0
0

Hi everyone,

I have created a Python script that calculates the optimal color temperature for my lights based on the sun’s position and weather information. I want to run this script every 5 minutes and publish the color temperature values as a sensor in Home Assistant.

Initial Approach

I tried using the command_line integration to run the Python script at an interval of 300 seconds (5 minutes) to update a sensor with the calculated values. This approach is neat and straightforward—if it works.

The Issue

My script relies on custom Python packages. I logged into my HA VM (using the SSH Terminal add-on) and created a virtual environment (venv) where I installed the required packages. However, when I try to run the script using the command_line integration with the venv interpreter, it fails to find the interpreter.

Why?
The command executed by the command_line integration runs inside the Home Assistant container (running on the HAOS VM), and the paths to the interpreter are not the same as on my host. I could log into the container and create the venv there, but I would prefer not to do that.

Request for Suggestions

Does anyone have suggestions on how I can solve this issue? Alternatively, is there another way to achieve my goal—perhaps by running the script as an add-on or using another method?

Thanks in advance for any help or advice!

1 post - 1 participant

Read full topic


Mystery running of automations

$
0
0

I have mentioned this before, but this is a total mystery for me.
For the past few weeks, several automations, all with OFF included in the name, run randomly several times a day.

I have tried to identify why, but no success.

I have deleted some of the automations and created them from scratch again, but still same problem.

Any suggestions are welcome.

2 posts - 2 participants

Read full topic

UI for scheduling lights

$
0
0

Hello,
I mainly use HA on my phone as a remote control for lights, plus a couple of thermometers.

I’ve set up some schedules for turning lights on/off at set times but this quickly becomes unwieldy on a phone because the UI has a separate entity for each event rather than each light.

Is there a way to group the on/off switch and on/off times in the UI (I only need one on period per day).

Thanks for any suggestions.

2 posts - 2 participants

Read full topic

Reptile keeper

$
0
0

We need more icons for reptiles. Bearded dragons, chameleons, geckos, and monitors.

3 posts - 3 participants

Read full topic

Sunrise and sunset for canary breeding

$
0
0

Hi, i’m new here, i trying tò setup a manual sunrise/sunset for my gf’s father who’s a canary breeder and nerds tò shorten/lenghten the days by creating and artificiali sunrise and sunset

Toghether with chatgpt i set up some variables in configuration, and then set up this automation:

`- alias: “Sunrise and Sunset Simulation”
description: “Gradually adjusts brightness to simulate sunrise and sunset.”
mode: restart # Ensures the automation restarts if triggered while still running
trigger:
# Trigger for sunrise simulation based on manual input time
- platform: template
value_template: “{{ states(‘sensor.time’) == states(‘input_datetime.alba_orario’)[0:5] }}”
id: “sunrise”

# Trigger for sunset simulation based on manual input time
- platform: template
  value_template: "{{ states('sensor.time') == states('input_datetime.tramonto_orario')[0:5] }}"
  id: "sunset"

action:
- choose:
# Sunrise Simulation
- conditions:
- condition: trigger
id: “sunrise”
sequence:
# Define variables for duration, step count, and brightness increment
- variables:
total_duration: “{{ states(‘input_number.alba_durata’) | int * 60 }}” # Convert minutes to seconds
step_count: 50 # Number of brightness steps
brightness_increment: “{{ 255 / step_count }}” # Increment per step
step_duration: “{{ total_duration / step_count }}” # Duration per step

        # Turn on the light at the lowest brightness
        - service: light.turn_on
          target:
            entity_id: light.e27_2018_philips_pantografo
          data:
            brightness: 1

        # Gradually increase brightness over the specified duration
        - repeat:
            count: "{{ step_count }}"  # Repeat for the specified number of steps
            sequence:
              - service: light.turn_on
                target:
                  entity_id: light.e27_2018_philips_pantografo
                data:
                  brightness: "{{ [state_attr('light.e27_2018_philips_pantografo', 'brightness') | int(default=1) + brightness_increment | int, 255] | min }}"
                  transition: "{{ step_duration | int }}"
              - delay:
                  seconds: "{{ step_duration | int }}"  # Wait for the transition to complete before next step

    # **Sunset Simulation**
    - conditions:
        - condition: trigger
          id: "sunset"
      sequence:
        # Define variables for duration, step count, and brightness decrement
        - variables:
            total_duration: "{{ states('input_number.tramonto_durata') | int * 60 }}"  # Convert minutes to seconds
            step_count: 50  # Number of brightness steps
            brightness_decrement: "{{ 255 / step_count }}"  # Decrement per step
            step_duration: "{{ total_duration / step_count }}"  # Duration per step

        # Gradually decrease brightness over the specified duration
        - repeat:
            count: "{{ step_count }}"  # Repeat for the specified number of steps
            sequence:
              - service: light.turn_on
                target:
                  entity_id: light.e27_2018_philips_pantografo
                data:
                  brightness: "{{ [state_attr('light.e27_2018_philips_pantografo', 'brightness') | int(default=255) - brightness_decrement | int, 0] | max }}"
                  transition: "{{ step_duration | int }}"
              - delay:
                  seconds: "{{ step_duration | int }}"  # Wait for the transition to complete before next step

        # Turn off the light completely at the end of the sunset simulation
        - service: light.turn_off
          target:
            entity_id: light.e27_2018_philips_pantografo`

Which does the job, but in the log the seem tò not shut down (It stops dimming the lights, but in the log It shows as ongoing even After hours). Me and chatgpt can’t seem tò find why

Can you spot anything?

Thank you

1 post - 1 participant

Read full topic

Problems with Ekaza EKVZ-T1016

$
0
0


Hi everyone, I’m having problems with a vibration sensor. The model is EKVZ-T1016, but it is identified by HA as TS0210 by _TZ3210_kjafhwd2.

The sensor is identified, installed, but always shows DETECTED. Furthermore, after adding it, it seems to stop communicating. I’ve already changed the battery, tried removing and reinstalling it, repairing and reconfiguring it, but the problem persists. Searching for TS0210, I saw that it had problems in the past, but that they have already been fixed in newer versions. Can anyone help me? Is it a defect in the device, or a bug?

Device

I’ve already changed the battery for a new one and it shows 50% charge. The old one showed the same.

Thanks

1 post - 1 participant

Read full topic

What's wrong with my configuration.yaml?

$
0
0

Trying to use history_stats: and sensor: to create sensors that show (1) running total propane gas usage for most recent 10 days and (2) running average daily propane gas usage over past 10 days.

I’m not stuck on this method, and I’m very far from an expert at this.

What did I mess up?

I’ve got this in my configuration.yaml, but it’s not working.:

sensor:
  - platform: history_stats
    name: "630_propane_level_now"
    entity_id: sensor.propane_tank_neevo_630_gallons_rest
    state: "any"
    type: "time"
    end: now
    duration:
      seconds: 1

  - platform: history_stats
    name: "630_propane_level_10_days_ago"
    entity_id: sensor.propane_tank_neevo_630_gallons_rest
    state: "any"
    type: "time"
    end: now - timedelta(days=10)
    duration:
      seconds: 1

template:
  - sensor:
      - name: "630_propane_10_day_diff"
        unit_of_measurement: "gal" # Adjust this to match your sensor's unit
        state: >
          {% set current_value = states('sensor.630_propane_level_now') | float %}
          {% set past_value = states('sensor.630_propane_level_10_days_ago') | float %}
          {{ (current_value - past_value) | round(2) }}

  - sensor:
      - name: "630_propane_10_day_ave"
        unit_of_measurement: "gal"
        state: >
          {{ (sensor.630_propane_10_day_diff / 10 ) }}

1 post - 1 participant

Read full topic

Write JSON structure for IMAP mails

$
0
0

Hey there, I want to read mails with the IMAP integration of Home Assistant. This works very well. But I want to save the last 10 mails that were received and according to my conditions. I tried several options like MQTT but it’s problematic when you want to use an JSON array then and also use the data again. I need to be able to read it again after being saved.

I really don’t know how to do it. I tried it with notify.file but got several problems that nothing would be saved. The last try for my automation now looked like this:

alias: Save mails
description: >-
  Saves the last 10 mails as JSON-Array and updates variables.
triggers:
  - event_type: imap_content
    id: custom_event
    trigger: event
actions:
  - variables:
      new_email: |
        {{
          {
            "subject": trigger.event.data.subject,
            "sender": trigger.event.data.sender,
            "message": trigger.event.data.text,
            "folder": trigger.event.data.folder,
            "server": trigger.event.data.server,
            "username": trigger.event.data.username,
            "search": trigger.event.data.search
          }
        }}
  - variables:
      current_emails: >
        {% set history = states('sensor.email_history') %} {{ (history if
        history not in ['unknown', 'unavailable', 'None'] else '[]') | from_json
        }}
  - variables:
      updated_emails: >
        {{ (current_emails + [new_email])[-10:] }}  
  - data:
      topic: email/history
      payload: "{{ {'emails': updated_emails} | tojson }}"
      retain: true
    action: mqtt.publish

But this won’t work. In the end, I really want to be able to see a list in a dashboard with the latest 10 subjects of mails. But I don’t know how to do this. Having 10 separate sensors for this might be possible somehow but sounds ridiculous to me.

1 post - 1 participant

Read full topic


How do I have my automation activate a scene based on the value of a sensor

$
0
0

I have frequent very short duration power interruptions at my house that don’t impact the machine I am running HA on, but does impact almost everything else. So I want to insure that whenever my power comes back a bunch of lights that I have set up for my house plants and pets get set to the appropriate conditions.

I have a template sensor that returns the last scene applied from the relevant category of scenes, and I would like to activate that scene any time one of the lights in that scene changes state from unavailable. I have the trigger part of my automation figured out, but how do I do the actions portion?

2 posts - 2 participants

Read full topic

My first day using HA and I'm having trouble setting up thread boarder router using HomePod Mini and getting my HomeKit devices into HA

$
0
0

Hello! I just installed HAOS on my new Raspberry Pi 5 16GB. I was able to add my HomePod Mini and Google Nest speakers to HA, but I can’t seem to add my HomePod Mini my preferred thread boarder router? I got to where it asks for the thread border router URL, but all I know is the local address for the HomePod, so I’m stuck! I read a few threads saying people used HomePods but not how. Also, I am having some trouble adding HK devices using HK setup code, I deleted some devices from HK (without resetting) but the HK setup codes fail. I’ve read over what I could find but I’m just not clear how to finish setting up my thread boarder router or why my HK setup codes aren’t working. Any help would be much appreciated. Thanks! :blush:

1 post - 1 participant

Read full topic

Issues with Homekit Bridge including devices when no domains are selected

$
0
0

Hi Forum,

i am new to HA so i may be doing something wrong but I want to see what is really going on here. I dont have much integrated into my HA right now. I have an aqara zigbee contact sensor, via MQTT (mosquitto + zigbee2mqtt). Now upon installation of HA, also there is a “person” entity with my name also.

when I go to create a homekit bridge device, per screenshot, even if i do not select ANYTHING, once i scan the QR code, BOTH of these devices get imported, even tho I have not selected anything.

Why is that?

second question: how does the removal of devices from homekit work if you have removed them within homekit bridge?


1 post - 1 participant

Read full topic

Aqara mini switch into homekit via homekit bridge

$
0
0

Hi Forum,

I have an aqara mini switch WXKG11LM. I have added the devices to HA via MQTT and zigbee2MQTT using a sonoff Dongle. The device shows up in my zigbee2MQTT frontend as well as in MQTT broker integration in HA as shown in screenshot however as you can see, it does not show up as a button. It shows two diagnostic entites for temp and battery and others which are disabled.

my use case here is to setup homekit bridge and use that to add this device into homekit. However this device does not show up in the list for entities for me to be able to add to homekit bridge. The button works, as I have created a test automation in HA itself. However I want to bring it into homekit and setup some automation there.

does any one have any insight into this? or knows what Im doing wrong if anything?

As a side note I have enabled “Home Assistant legacy action sensors” , in zigbee2mqtt, which lets this device show up as an event entity. However still no way to select it to be imported using homekit bridge into homekit.

I also do use homebridge application and when i bring them into homebridge using the zigbee2mqtt plugin , the button is imported into homekit just fine . just FYI

1 post - 1 participant

Read full topic

Fashion Rupee Loan App Customer” Care Helpline Number 91) 9359553971@! {×935×9553×971×}®️™ Call

$
0
0

Fashion Rupee Loan App Customer” Care Helpline Number 91) 9359553971@! {×935×9553×971×}®️™ CallFashion Rupee Loan App Customer” Care Helpline Number 91) 9359553971@! {×935×9553×971×}®️™ CallFashion Rupee Loan App Customer” Care Helpline Number 91) 9359553971@! {×935×9553×971×}®️™ CallFashion Rupee Loan App Customer” Care Helpline Number 91) 9359553971@! {×935×9553×971×}®️™ CallFashion Rupee Loan App Customer” Care Helpline Number 91) 9359553971@! {×935×9553×971×}®️™ CallFashion Rupee Loan App Customer” Care Helpline Number 91) 9359553971@! {×935×9553×971×}®️™ CallFashion Rupee Loan App Customer” Care Helpline Number 91) 9359553971@! {×935×9553×971×}®️™ Call

2 posts - 1 participant

Read full topic

Viewing all 106026 articles
Browse latest View live


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