Git Product home page Git Product logo

Comments (6)

jakezp avatar jakezp commented on May 14, 2024

This is awesome! Thanks! I've been playing around with it and updated the commands and states as below. Home assistant does not support 'sleep' at the moment, only 'arm' and 'stay'.

Would you mind updating as below?

diff --git a/paradox/interfaces/mqtt_interface.py b/paradox/interfaces/mqtt_interface.py
index 348874d..2526f63 100644
--- a/paradox/interfaces/mqtt_interface.py
+++ b/paradox/interfaces/mqtt_interface.py
@@ -15,12 +15,12 @@ logger = logging.getLogger('PAI').getChild(__name__)
 PARTITION_HOMEBRIDGE_COMMANDS = dict(
     STAY_ARM='arm_stay', AWAY_ARM='arm', NIGHT_ARM='arm_sleep', DISARM='disarm')
 PARTITION_HOMEASSISTANT_COMMANDS = dict(
-    ARM_AWAY='arm', NIGHT_ARM='arm_sleep', DISARM='disarm')
+  armed_home='arm_stay', armed_away='arm', armed_sleep='arm_sleep', disarmed='disarm')

 PARTITION_HOMEBRIDGE_STATES = dict(
     alarm='ALARM_TRIGGERED', stay_arm='STAY_ARM', arm='AWAY_ARM', sleep_arm='NIGHT_ARM', disarm='DISARMED')
 PARTITION_HOMEASSISTANT_STATES = dict(
-    alarm='triggered', stay_arm='armed_away', arm='armed_away', sleep_arm='armed_home', disarm='disarmed')
+    alarm='triggered', stay_arm='armed_home', arm='armed_away', sleep_arm='armed_sleep', disarm='disarmed')

 ELEMENT_TOPIC_MAP = dict(partition=cfg.MQTT_PARTITION_TOPIC, zone=cfg.MQTT_ZONE_TOPIC,
                          output=cfg.MQTT_OUTPUT_TOPIC, repeater=cfg.MQTT_REPEATER_TOPIC,

from pai.

jpbarraca avatar jpbarraca commented on May 14, 2024

Can you do a Pull Request? That way your contribution will be explicitly identified.

from pai.

cdk222 avatar cdk222 commented on May 14, 2024

Hi Jakezp

Are you are to help with the Home assistant config you used to get this working (.yaml)? I had Tertiush working but cant seem to get this one going. thx

from pai.

jpbarraca avatar jpbarraca commented on May 14, 2024

I added the patch suggested by @jakezp
The states will be present at paradox/states/partition/PARTITION_NAME/current_hass
You can control the partition using the standard path: paradox/control/partition/PARTITION_NAME

from pai.

yozik04 avatar yozik04 commented on May 14, 2024

@jakezp Closing as two weeks has passed. Reopen if required.

from pai.

jakezp avatar jakezp commented on May 14, 2024

Apologies for being inactive for so long. I've been busy renovating and things are a mess and most things are unplugged at the moment. I've connected everything again and updated home assistant and pai to see if all is working now.

Seems with the new HA lovelace interface, the alarm panel has states available to be used:
arm_home
arm_away
arm_night
arm_custom_bypass

In addition to this, there is still the option to use the previous way to configure the alarm.

I was wondering if it might not be worthwhile make the home assistant COMMANDS and STATES configurable in user.py? Then it can set to a default value in defaults.py, but configurable in user.py? This will allow future HA changes to be updated in the config file instead of requiring the code to be changed again.

from pai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.