[APP][Pro] Home Assistant - Community App

Hi @SossieNL , @Peter_Kawa
The zone settings are Homey default. It’s not defined in the app.
Let me check the SDK later if it perhaps depends on a special capability.

@SossieNL Just to check in my side…
You added the sensor as sensor device?
Can you please go to device/maintenance/repair dialog and go to device detail. Please post the details (or send as PM)
I think the sensor is not defined as motion sensor in HA but as simple binary_sensor. Perhaps the alarm_motion will raise the zone activity, but a custom capability like alarm_generic not.

I can answer this one, it has 2 things that are mandatory to be included as zone activity.
It needs to be of class sensor, and be 1 of 2 capabilities, alarm_motion or alarm_contact

2 Likes

Thanks, @Caseda.

@SossieNL
So it’s caused by using alarm_generic instead of alarm_motion.
I will take a look at the code how exactly the HA entities are interpreted.

Hmm. That’s very empty. Yes added it as a sensor

Hm, the app should read the current entity details.
Can you please check if your sensor entity has an attribute device_class? If yes, is it set as “motion”?

…and thanks for your donation :beers: :grinning:

1 Like

My sensor shows device_class motion, that seems right
@SossieNL In HA, go to :

When I re-add it to Homey,
Screenshot from 2023-03-29 18-24-16

it shows up as alarm_motion sensor and activates the zone
Screenshot from 2023-03-29 18-25-06


I also have an empty device details screen now, but it did work a while ago, I checked several HA devices. @RonnyW

The application log screen still shows info though:

[log] 2023-03-29 18:24:53 [Driver:sensor] [
  {
    "name": "presence-toilet-occupancy",
    "data": {
      "id": "binary_sensor.presence_toilet_occupancy"
    },
    "capabilities": [
      "alarm_motion"
    ],
    "icon": "../../../assets/icons/capabilities/alarm_motion.svg",
1 Like

Good morning @RonnyW,

when i try a “or” with a “Lux” card, i just become this error:

the sensor himself change the values right:
image

thx

Hi @schmucke
The existing conditions (Value “text”/“numeric”) are used for the generic capabilities measure_numeric and measure_generic. These capabilities are used if there is no defautl capability found for the entity based on its device class.
And measure_luminance doesn’t have default condition cards.

So far the technical reason. Now to your flow:

  • You can’t use the card you tries. Beside there is a bug (error message) you found :+1: it’s not checking the luminance capability
  • measure_luminace doesn’t provide a condition card
  • So only and recommended solution is to use a logic card and the global tag

grafik

Perhaops it also would be better to remove these cards because it’s irritating.
capability dependent cards are not so nice to use for dynamic devices that can have dynamic capabilities.

1 Like

@schmucke
I took your question as suggestion to read the first numeric capability from the device if measure_numeric is not found so it will be possible to use this card also for devices without measure_numeric, but with another numeric capability.
So it’s working a bit mor generic :slight_smile:

This will be added to the next version.

1 Like

New test version 1.3.0

Changes:

  • Fix for switch device state not updating if a second entity is added.

  • Fix for generic flow conditions “Numeric value greater” and “Textvalue equal”.
    These condition cars are checking the capabilities measure_numeric or measure_generic. In these capabilities are not found, the first numeric or text cability is used. This way these cards can also be used for sensor devices with other capabilities like temperature or luminance.

  • Now the most importand addon:
    Added possibility to individually add, change and remove entities.

  • And in addition there is a new device type to create a device from scratch and add your entities. You can see it as an easy “build your own device” alternative to compound devices.
    No need to add the HA integration, no HA restarts. Just add the device and add your entities.
    grafik


Some details about the entity functionality:

Add entity:
Go to device maintenance/repair dialog to start…
grafik


Now you can select an entity start writing some text to filter the list.
grafik
Select the entry you want to add to your device. Some fields are preassigned with entity dependent content like name and unit. You can adjust name and unit to your needs.
In addition the capability is also shown that will be used to add th entity. It’s discovered by the entities device class or unit.
grafik
You can change the capability using the dropdown list. You can also change the subcapability name.
If you want to add the capability as main capability (without subcapability like “onoff” to get quick actions), you can easily check the checkbox or delete the subcapability name in the capability field.
If you need to convert the HA entity value you can add a JavaScript function. The “i” button gives some hints how to use it.
grafik
The Button “Add Entity” adds instantly your entity as new capability.

Change entities:
All this way added entities can be changed afterwards. Adjust name, unit or converter function.
Select one entity that was added to your device.
grafik
Then change the details.

Remove entities:
You can remove the entities just as easily:
grafik


Some technical details:

  • This functionality is based on the previously added functionality of adding device sensors in device settings. Entities added this way can be changed or removed in the same way.
  • Main entities added on device pairing (like light or thermostat capabilities) can’t be adjusted.
  • Only entities of type sensor, binary sensor, button or switch can be added. These entities can be used in a generic way. In contrast, special entities that need a special capability handling or special HA services to interact with HA, will still only be useable using the corresponding Homey device.
  • But using this new feature, you can easily add some single sensors to your existing device.

Now have fun building your devices in Homey :magic_wand:

Please report issues providing some details like changed device type, added entity type (domain, perhaps screenshot of entity details from HA developer tools).

9 Likes

i used this new functionality to add my dryer…

Hi Edwin, the switch update should be fixed in new test version.

1 Like

Worked like a charm!! Thanks!!

1 Like

Another one. Anyone any luck with the 4 & 6 button Aqara Opple switch/buttons?

I don’t see them under “Button” or “Switch”. But I do see them under “Sensor”. The value of “action” changes rapidly to a text describing the action I did. For instance; “button_1_single”.

I assume we need to do something in HA again? Any advice?

If it’s sensor, then you can react with a flow on state change. Just us the ‘value changed’ flow card and check the value using the flow card tag in a logic card.
Here is a similar example (this and following posts):

Yeah that’s how I implemented it. So it does work! However, it’s a bit less efficient, better to see a button-pressed scene? where you can also have single or double presses. That’s now al IF / THEN in my flows.

:man_shrugging: That’s how HA works. Every integration has it’s own logic and implementation. No general logic to rely on.

And a button entity has only a timestamp that would trigger a flow like your “value has changed” trigger. You would need a single button entity in HA for every physical button on your wall device.

But hey, you can just use existing trigger for your sensor device.
Much better than using a device independent event trigger in case of buttons that don’t have any entity in HA but sending only events like Hue’s.

1 Like

New test version 1.3.1:

  • Adjustes “non physical” devices like scenes to handle the new “add entities” functionality.
  • Some optical adjustments in repair view
1 Like

About app crashes caused by invalid JSON content

Sometimes I get crash reports because inside the used HA websocket module an exception is thrown while parsing the JSON string sent from HA. This error occours bacause the JSON string is invalid (double quotes, invalid characters, invalid syntax).
The HA app can’t react on this error because it processed asynchronous inside the module.

I got information from the module developer about a fix in HAs orjson module that will hopefully fix this issue.
If your HA app crashed with an error like SyntaxError: Unexpected token : in JSON at position 3272, you will need to update your HA installation to 2023.3 or newer.

To track this error, please report such errors/crashes including information about your HA version. Thanks.

1 Like

Hi @RonnyW , fantastic app, thank you for developing it, it allows me to add boiler, which is HA connected via ESP32 and Bluetooth :wink:

I was recommending now somewhere else to use HA for connecting some LGThinq appliances but when there is ton of sensors, switches etc., there are no real appliances… may I ask you, do you plan to add more devices, eg. washer and dryer ? :face_with_peeking_eye:

update just discovered you included custom devices in the TEST, looking on it right now :wink: