Commit Graph

64 Commits (c7226ec28f9c2be89ab088c3f910a59a84e6e16a)

Author SHA1 Message Date
Fabian Affolter 87b33d5098 Move configuration details to docs 2016-01-27 09:23:44 +01:00
MartinHjelmare 2e175b88bc Fix unit of measurement
* Add version check in unit_of_measurement, to avoid error.
* Remove not needed metric check in unit_of_measurement.
* Add more value types to unit_of_measurement.
* Fix unit prefix
* Remove unused SCAN_INTERVAL variable.
2016-01-27 03:18:59 +01:00
MartinHjelmare 9117fa6eb8 Fix adding devices on the fly
Devices were not added without persistence enabled and restart of HA.
Node id was added to defaultdict(list) by mistake when checking if list
of defaultdict was empty.

* Fix adding devices in mysensors_callback.
* Change devices to regular dict.
2016-01-26 18:12:13 +01:00
MartinHjelmare 9249dc6dd3 Fix missing binary sensor types
* Add missing binary sensor types to sensor/mysensors.
* Remove unneeded pylint disable.
2016-01-19 19:26:40 +01:00
MartinHjelmare 2d8cf7de44 Fix wrapper and S_BINARY and bump req. version
* Wrap existing SerialGateway instance instead of subclassing
	SerialGatewat class.
* Add S_BINARY in switch platform only in version 1.5 of mysenors api.
* Use version 0.4 of pymysensors.
* Show gateway port as state attribute.
2016-01-10 04:10:38 +01:00
MartinHjelmare 69ed6fe6e7 Add gateway wrapper, fix discovery and callbacks
* Add gateway wrapper by subclassing serial gateway.
* Fix platform setup with discovery service.
* Fix platform callback functions with callback factory.
2015-12-31 05:48:23 +01:00
MartinHjelmare be25ea4f09 Fix avoid event bus for updates 2015-12-24 02:14:58 +01:00
MartinHjelmare 9f54bcc21b Fix comments for pull request
* Fix cleaner user config.
* Remove bad disabling of linting.
* Extract default mysensors version into constant.
* Clean up selection of mysensors.CONST from version.
* Update mysensors update decorator to add devices and update values
	in one go.
* Fix persistence update.
* Clean up setup of ports.
* Setup of mysensors platforms from main mysensors component.
* Clean up v_types selection in mysensors sensor platform.
* Fix s_types and v_types selection version dependency in platforms.
2015-12-23 23:20:39 +01:00
MartinHjelmare 845926236e Add config sample and fix requirements_all 2015-12-18 03:58:21 +01:00
MartinHjelmare 659226886f Update .coveragerc and requirements 2015-12-18 03:37:49 +01:00
MartinHjelmare 1e52d5c7f2 Add S_TYPES to platform type and fix persistence
* Add S_TYPES to platform type.
* Fix persistence update on startup.
* Clean up code.
2015-12-09 04:43:18 +01:00
MartinHjelmare 7cc707f1ce Fix docstrings to conform to pep 2015-12-08 01:03:07 +01:00
MartinHjelmare 59524c7933 Add multiple gateways
* Add support for multiple serial gateways.
* Fix serialization of python objects by adding dict representation of
    classes.
* Add support for showing more than one child value type per entity.
    The entity state is always only one value type. This is defined by
    the platform value types. Value types that are not defined as the
    platform value type are shown as state_attributes.
* Add more unit of measurement types.
* Clean up code.
2015-12-06 00:29:03 +01:00
MartinHjelmare 45fe37a301 Add mysensors component and switch platform
* Add a general mysensors component. This sets up the serial comm
        with the gateway through pymysensors. The component also
        contains a decorator function for the callback function of
        mysensors platforms. Mysensors platforms should create a
        function that listens for the node update event fired by the
        mysensors component. This function should call another
        function, that uses the decorator, and returns a dict. The dict
        should contain a list of which mysensors V_TYPE values the
        platform handles, the platfrom class and the add_devices
        function (from setup_platform).
    * Change existing mysensors sensor platform to depend on the new
        mysensors component.
    * Add a mysensors switch platform. The switch platform takes
        advantage of new functionality from the the fork of pymysensors
        https://github.com/MartinHjelmare/pymysensors, that enables the
        gateway to send commands to change node child values.
    * Change const and is_metric to global constants, in the mysensors
        component and import const depending on the mysensors version
        used.
    * Change variables devices and gateway to global variables.
    * Add some debug logging at INFO log level.
2015-11-06 01:58:41 +01:00