Skip to content

Commit

Permalink
v0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
YeonV committed Nov 16, 2020
1 parent f889e01 commit e9ca4d3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# LedFX ReMote for HomeAssistant

[![hacs_badge](https://img.shields.io/badge/HACS-Custom-blue.svg)](https://github.com/custom-components/hacs)
![state](https://img.shields.io/badge/STATE-alpha-blue.svg)
![version](https://img.shields.io/badge/VERSION-0.1.2-blue.svg)
![state](https://img.shields.io/badge/STATE-beta-blue.svg)
![version](https://img.shields.io/badge/VERSION-0.1.3-blue.svg)
[![license](https://img.shields.io/badge/LICENSE-MIT-blue.svg)](https://github.com/YeonV/ledfxrm/blob/main/LICENSE)
[![creator](https://img.shields.io/badge/CREATOR-Yeon-blue.svg)](https://github.com/YeonV)
[![creator](https://img.shields.io/badge/a.k.a-Blade-blue.svg)](https://github.com/YeonV)
Expand Down
6 changes: 6 additions & 0 deletions custom_components/ledfxrm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
DOMAIN,
PLATFORMS,
STARTUP_MESSAGE,
SWITCH
)

SCAN_INTERVAL = timedelta(seconds=30)
Expand Down Expand Up @@ -55,6 +56,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):

for platform in PLATFORMS:
if entry.options.get(platform, True):
if platform is SWITCH:
if thestart is None:
continue
if thestart == '192.168.1.56:1337/?ledfxstart':
continue
coordinator.platforms.append(platform)
hass.async_add_job(
hass.config_entries.async_forward_entry_setup(entry, platform)
Expand Down
4 changes: 2 additions & 2 deletions custom_components/ledfxrm/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ async def _show_config_form(self, user_input): # pylint: disable=unused-argumen
{
vol.Required(CONF_HOST, default="192.168.1.56"): str,
vol.Required(CONF_PORT, default=8888): int,
vol.Required(CONF_START, default="192.168.1.56:1337/?ledfxstart"): str,
vol.Required(CONF_STOP, default="192.168.1.56:1337/?ledfxstop"): str
vol.Optional(CONF_START, default="192.168.1.56:1337/?ledfxstart"): str,
vol.Optional(CONF_STOP, default="192.168.1.56:1337/?ledfxstop"): str
}
),
errors=self._errors,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/ledfxrm/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
NAME = "LedFX ReMote"
DOMAIN = "ledfxrm"
DOMAIN_DATA = f"{DOMAIN}_data"
VERSION = "0.1.2"
VERSION = "0.1.3"
MANUFACTURER = "YeonV"

ISSUE_URL = "https://github.com/YeonV/ledfxrm/issues"
Expand Down
4 changes: 2 additions & 2 deletions custom_components/ledfxrm/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ async def async_turn_on(self, **kwargs): # pylint: disable=unused-argument
await self.coordinator.async_request_refresh()
return True

await self.coordinator.api.async_change_something(True)
#await self.coordinator.api.async_change_something(True)
await self.coordinator.async_request_refresh()


async def async_turn_off(self, **kwargs): # pylint: disable=unused-argument
"""Turn off the switch."""
await self.coordinator.api.async_change_something(False)
#await self.coordinator.api.async_change_something(False)
await self.coordinator.async_request_refresh()


Expand Down

0 comments on commit e9ca4d3

Please sign in to comment.