Sorry for the late reply, I posted most of my code here: GitHub - TurboTronix/Hassio-DIY-ethernet-controlled-irrigation
Thank you so much for sharing!
can you enter the lovelace configuration as well?
I donāt have any Lovelace dashboard for that because I only use it to automate some things. I have a button to start a manual irrigation but it is a standard button entity card.
I am working on the integration l, I hope it can be ready after Easter, I will keep you guys posted
ok ok
thank you for the integration!
Dear all,
I just developed a Netro Smart Garden integration for Home Assistant.
Take a look here if interested: GitHub - kcofoni/ha-netro-watering: Netro Smart Garden integration for Home Assistant.
Best regards
What a great job!!! Thanks for sharing
Thank you @Yoryino for your encouragement . Tenās of downloading/cloning have been performed but very few feedback. Maybe itās not buggy enough so that people enjoy silently Good news
You are right, no news, good news. Good job. Thx and regards.
What a great job!!! I have no words.
Superb!
Thanks a lot.
Hi,
This is amazing. Iām on vacation now but Iāll test it this weekend.
Jens
Great job! Thank you very much.
I started the integration myself but never finished itā¦ Thanks for making it happen
I did manage to get the pip package published: netrohomeapi Ā· PyPI
in case it helps you in the future.
One thing I implemented (well, not fully obviously) is the calendar, so when you have the smart algorithm planning the schedule for you, you can see it in home assistant and act accordingly. I havenāt gone deep into your code, but I think that if you want, it should be fairly easy to add it, here is my code:
calendar.py
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_entities):
hub: NetroHomeHub = hass.data[DOMAIN][entry.entry_id]
entities = []
irrigation_calendar = NetroCalendar(
hub=hub,
name="Irrigation",
key="irrigation",
)
entities.append(irrigation_calendar)
_LOGGER.debug("Adding calendars")
async_add_entities(entities)
return True
class NetroCalendar(NetroHomeHubEntity,CalendarEntity):
_required_endpoints = [EPK_SCHEDULES]
_all_events:list[CalendarEvent] = []
_event: CalendarEvent = None
_attr_icon: str = "mdi:calendar-clock"
@callback
def _on_new_data(self):
events = self._hub.get_irrigation_calendar_events()
events = [] if events is None else events
events = [
CalendarEvent(
start=e.start_time,
end=e.end_time,
summary=self._hub.zone_names.get(e.zone, f"Zone {e.zone}"),
description=f"Duration: {e.duration}. Source: {e.source}",
) for e in events
]
self._all_events = events
self._event = min(events, key=lambda x: x.start) if len(events) > 0 else None
self.async_write_ha_state()
async def async_get_events(
self,
hass: HomeAssistant,
start_date: datetime.datetime,
end_date: datetime.datetime,
) -> list[CalendarEvent]:
"""Get all events in a specific time frame."""
return [e for e in self._all_events if e.start > start_date and e.start < end_date]
@property
def event(self) -> CalendarEvent | None:
return self._event
Again, thank you and keep it up!
Thank you for your post @GeorgeBark.
Adding a calendar including coming schedules is definitely a so good idea . I am going to study the way to integrate in the code.
I am a bit busy at the moment so it will not be done in the next few days unfortunately. If you have the courage to look at my code and want to contribute, donāt hesitate to suggest a PR. It will be a pleasure to share the authorship of this integration with you. You seem to have a good knowledge of home assistant so it would probably be very beneficial for the āmanyā users
Looking forward to reading from you
Iām looking at the āreport weatherā action (pka - āserviceā). Iād like to provide information from my ecowitt weather station (using the ecowitt integration) to Netro. Can anyone please post their action calls as examples of how to do this?
Question 1: Iād like to report rain (an obvious first place to start). Should I take the ādaily rainā as reported by Ecowitt, and send it to netro say (for example) once an hour? Would netro replace this value with the new value I send? If it rains all day, the ecowitt value would gradually increase through the day. I assume Netro would replace the previous value with the new one I send each hour (as opposed to adding it to the previous value)?
Question 2: Iād like to keep the weather service config in my netro system. My ecowitt can tell me what happened and what is happening - but does not forecast. So what happens if I report rain fall amounts each hour, and then the weather service (weather underground - WUG) tells netro that it is not raining (or provides a different value than I gave it?) Would the WUG value over write the Ecowitt value I provided? Should I disable the weather provider in Netro and thus not have a forecast capability?
Iām very interested in hearing other peoples experiences with the āReport Weatherā action.
Thanks,
Ken